The code for UI interactions? If it responds and updates within 20 ms, my mouse will flow smoothly over the screen...
The validation logic? The business rules? The database access code? None of these benefit from parallelism as single thread performance is more than sufficient to return responses within *human* limits.
Parallelism is already employed at almost all of the stages where it matters, and it won't need to be written by the average joe programmer. They just use a library to play that sound or video (offloaded to GPU)... They just write a per request application, that scales by using a thread per request and if necessary multiple instances of the server. They just access that database, which then does a highly optimized parallel search for the results...
Teaching Joe to make use of the correct libraries and using things like WHERE and GROUP BY is a better investment.
There's absolutely nothing wrong with multiple returns, continue and breaks. Don't let some purist that got this added to your favourite "code checker" tool fool you that just because the rule is there, it must be good.
I got an even better way. Use a proxy to access the internet. Set it up in your browsers and games (by allowing certain IP's only) and donot give Windows the proxy.
Now I'm the happy owner of a machine where only apps I want use the internet, and that list doesn't include Windows.
Wouldn't it be as simple as the containing vessel heating up, and you pump water along it? I mean, the plasma inside can be millions of degrees, and that would probably radiate to heat up the vessel as well when it starts producing energy.
A cubic millimeter of superhot plasma is not gonna heat up the entire containment vessel to melting point, but it might heat it up to say a nice comfortable 500 degrees orso...
Ah yes, given 30 years of historical data I can make a model that predicts future stock markets and the weather as well.
Here's what's really gonna happen: The people that are already filthy rich are going to be come even richer with automated labor and we're gonna get a ruling elite and a lower class that needs to be kept under control. Except this time, this ruling elite won't be so easily displaced because they'll have a robot army, robot drones, and as many as they need... they're filthy rich after all.
Except those annoying tabbers don't know how to tab properly. They use them everywhere, in comments, at the end of a line, etc. See how well that lines up when you change the tab size...
Only tab for indentation at the start of a line. Never mix tabs/spaces for identation. Then it might work.
Since most people don't have the time to care about this, teams decide to use spaces so it looks uniform everywhere. It's much easier to explain how to space properly than how to tab properly.
Just introduce a class for monetary values. It can wrap BigDecimal or anything you want. Give it functions that make sense (like convert, round, add, substract, but not functions like power, sin, cos, division, etc.).
Using double is just laziness. Just because money looks like a number doesn't mean you should use a primitive type. It's like using ints where you should use enums, or storing postal code in an integer field... think about what your data represents and if the standard functions like * + - / would make sense for them. If not, use a custom class -- it will help with type safety as well.
If you're replacing loops with Stream's forEach, then you're doing it wrong.
Banning streams is like banning multiple returns, use of ?: operator, regular expressions, etc. Tell those old coots that work on your team to suck it up and get with the times. I'm not rewriting stuff that is clear and concise to some triple nested behemoth just to avoid something that "looks too complicated".
Converting Solar energy into mechanical energy was however already invented in the 19th century... It just lost out to cheaper alternatives at the time.
Ugh, single return rule sucks the worst. Nothing like having to read through dozens of lines of code just to see if the result wouldn't change somewhere halfway when an early return could have made it clear in an instant.
The real issue here is that macros and scripts should always run in a very well designed and hardened sandbox. No matter what your script does, it won't be able to do more than screwing up the spreadsheet it came embedded with. It really is insane that a macro could harm your computer, except in Microsoft's world.
The culprit is simply bad design. Nobody in their right mind would allow arbitrary scripts from unknown sources to be run freely in an environment where they can affect things outside that environment.
Yeah, it was so much better before we had traffic lights... oh wait, it wasn't, they were actually invented for the very reason to keep traffic flowing over busy intersections.
It amuses me that people think that crippling infrastructure is the way to increase safety. I'd say it's bloody obvious because the correlation is less speed = more safety.
So the next step is to replace those roads with cobblestones... I'm sure people will slow down and accidents will decrease even further.
The real innovation will be when you can drive safer and faster at the same time. Lines help with that, as do wider roads.
You don't trust me with your source, but you do trust me to modify it... interesting!
Anyway, I'd never work for any company that forces me to work with one hand tied behind my back. I'll work for one of the 99 other offers I got instead.
What would you parallelize though?
The code for UI interactions? If it responds and updates within 20 ms, my mouse will flow smoothly over the screen...
The validation logic? The business rules? The database access code? None of these benefit from parallelism as single thread performance is more than sufficient to return responses within *human* limits.
Parallelism is already employed at almost all of the stages where it matters, and it won't need to be written by the average joe programmer. They just use a library to play that sound or video (offloaded to GPU)... They just write a per request application, that scales by using a thread per request and if necessary multiple instances of the server. They just access that database, which then does a highly optimized parallel search for the results...
Teaching Joe to make use of the correct libraries and using things like WHERE and GROUP BY is a better investment.
Show it an upside down dog...
There's absolutely nothing wrong with multiple returns, continue and breaks. Don't let some purist that got this added to your favourite "code checker" tool fool you that just because the rule is there, it must be good.
Too trusting. Block everything, and only allow stuff through a proxy. Of course, don't give the system the proxy...
I got an even better way. Use a proxy to access the internet. Set it up in your browsers and games (by allowing certain IP's only) and donot give Windows the proxy.
Now I'm the happy owner of a machine where only apps I want use the internet, and that list doesn't include Windows.
Wouldn't it be as simple as the containing vessel heating up, and you pump water along it? I mean, the plasma inside can be millions of degrees, and that would probably radiate to heat up the vessel as well when it starts producing energy.
A cubic millimeter of superhot plasma is not gonna heat up the entire containment vessel to melting point, but it might heat it up to say a nice comfortable 500 degrees orso...
Yes, because this time will be the same as all other times... we've got anecdotal proof!
Excuse me, I'm going to become rich on the stockmarket, I saw a pattern.
Ah yes, given 30 years of historical data I can make a model that predicts future stock markets and the weather as well.
Here's what's really gonna happen: The people that are already filthy rich are going to be come even richer with automated labor and we're gonna get a ruling elite and a lower class that needs to be kept under control. Except this time, this ruling elite won't be so easily displaced because they'll have a robot army, robot drones, and as many as they need... they're filthy rich after all.
It's imho the most likely outcome.
Ah, it's so easy. Just put random stuff in "DATA" and the real message in "KEY"!
...or we'll just encrypt the streams
Except those annoying tabbers don't know how to tab properly. They use them everywhere, in comments, at the end of a line, etc. See how well that lines up when you change the tab size...
Only tab for indentation at the start of a line. Never mix tabs/spaces for identation. Then it might work.
Since most people don't have the time to care about this, teams decide to use spaces so it looks uniform everywhere. It's much easier to explain how to space properly than how to tab properly.
List<SoftwareEngineer> softwareEngineers = ...
.filter(SoftwareEngineer::isShitty)
.map(SoftwareEngineer::toCodeMonkey)
.forEach(CodeMonkey::fire);
softwareEngineers.stream()
// problem solved.
Not really. BigDecimal offers way too much functionality that makes 0 sense for monetary values. Wrap it in a class, and only offer what makes sense.
Just introduce a class for monetary values. It can wrap BigDecimal or anything you want. Give it functions that make sense (like convert, round, add, substract, but not functions like power, sin, cos, division, etc.).
Using double is just laziness. Just because money looks like a number doesn't mean you should use a primitive type. It's like using ints where you should use enums, or storing postal code in an integer field... think about what your data represents and if the standard functions like * + - / would make sense for them. If not, use a custom class -- it will help with type safety as well.
If you're replacing loops with Stream's forEach, then you're doing it wrong.
Banning streams is like banning multiple returns, use of ?: operator, regular expressions, etc. Tell those old coots that work on your team to suck it up and get with the times. I'm not rewriting stuff that is clear and concise to some triple nested behemoth just to avoid something that "looks too complicated".
Converting Solar energy into mechanical energy was however already invented in the 19th century... It just lost out to cheaper alternatives at the time.
https://en.wikipedia.org/wiki/...
Ugh, single return rule sucks the worst. Nothing like having to read through dozens of lines of code just to see if the result wouldn't change somewhere halfway when an early return could have made it clear in an instant.
The real issue here is that macros and scripts should always run in a very well designed and hardened sandbox. No matter what your script does, it won't be able to do more than screwing up the spreadsheet it came embedded with. It really is insane that a macro could harm your computer, except in Microsoft's world.
The culprit is simply bad design. Nobody in their right mind would allow arbitrary scripts from unknown sources to be run freely in an environment where they can affect things outside that environment.
It still uses javascript, that needs to be interpreted, that runs within an incredibly resource hungry app called a browser.
Native apps run much faster and consume much less resources. On top of that, they integrate much better with the rest of the system.
What if I put each copyrighted video through a hash function that outputs zero or one...
Doesn't matter. A master at his/her craft is worth far far more than 1.3x that of a beginner.
Really? So they didn't know their own address, of which the street name is part...
Yeah, it was so much better before we had traffic lights... oh wait, it wasn't, they were actually invented for the very reason to keep traffic flowing over busy intersections.
It amuses me that people think that crippling infrastructure is the way to increase safety. I'd say it's bloody obvious because the correlation is less speed = more safety.
So the next step is to replace those roads with cobblestones... I'm sure people will slow down and accidents will decrease even further.
The real innovation will be when you can drive safer and faster at the same time. Lines help with that, as do wider roads.
You don't trust me with your source, but you do trust me to modify it... interesting!
Anyway, I'd never work for any company that forces me to work with one hand tied behind my back. I'll work for one of the 99 other offers I got instead.