Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:What could possibly go wrong? (Score 1) 216

Well,
in University we once learned/heard about LoC's and such and different kinds of software like: Applications, Tools, and System Programming.

The first Aha! effect was when the daily LoC productivity for those different types was shown:
Application Programming: 25 - 100 LoC per day
Tools Programming: 1 - 25 LoC per day
System Programming: < 1 LoC per day

The second effect was a combined wow and oops: the numbers stay more or less the same, regardless what programming language you use. That is why we had booms in Lisp and Smalltalk in the 1970s and later C, Python, C++ etc.

One line of Ada in System programming can simply be so much more than a single line of assembly. An 100 lines of Pascal in an Application is so much much more than 100 lines assembly.

Comment Re:What could possibly go wrong? (Score 1, Flamebait) 216

Why don't you agree not to talk about stuff you have no clue about?

a) inheritance is not an antipattern
Using it wrong might be an antipattern in the moment where it is used

b) multiple inheritance is not an antipattern either
For example the infamous "diamond pattern" only happens if you actually program it: intentionally. And there are plenty of use cases where MI is useful. Perhaps you should read some books about C++ before talking BS?

c) strictly speaking: JavaScript has no inheritance art all!
JS has syntactic sugar, that looks like inheritance in many cases, but is, oh oh, you hate it: a linked list of prototypes. The moment when you "inherit" in JS, you are actually referencing to another _object_, not a class!

The main problem is that people use languages in the same way as they used to do in another language. E.g. many C++ guys came from Smalltalk. So they use inheritance similar. Of course the main difference is static versus dynamic typing. Hence early class libraries for C++ looked over engineered. In Smalltalk you can beam methods into classes via meta classes. So you do not need MI. And also: two classes implementing the same method signature: do not need to have a common super class ... as dispatch is dynamic anyway.

For examples: Dart, Java and C# Generics are not the same thing. All work slightly different. And only C++ and some esoteric languages have real templates, you understand what that means, when you once did template meta programming.

The power of C++ is for example shines when you combine templates and MI. Before I give an example, most SI languages cheat anyway, and offer an alternative in one way or the other: with mixins or traits. And some do it really badly, for example Java with interfaces that have default implementations.

So, when do you use inheritance, oh, in C++ for example, you can inherit "privately" then you only get the implementation of the base(s), and your public inheritance chain looks clean. When I write a GUI framework however, why the fark would I _not_ use inheritance? Not using it would be completely braindead.

Now imagine a linked list class - called Link - with one template parameter, which is an enum, and one to mix in a base class.
enum { up, down } UpDown;
enum { next, previous } NextPrevious;

class CADPoint {
float x, y, z;
}

class MentorCADPoint : public ThreeDCADPoint, public Link[UpDown, MentorCADPoint], public Link[NextPrevious, MEntorCADPoint] {}

Instead of keeping your CADPoints in external lists of what ever kind, they have their list structure embedded, flat, in the MentorCADPoint class.

Yes, you inherit two times from the same template, but it has different template arguments. In reality you most likely would use protected inheritance ... or make the algorithms traversing your points, friends.

The only problem with inheritance is that most books explaining it: explain it wrong.

Neither a seaplane nor a water plane is crafted by inheriting from a boat and a plane ...

Your main problem is: you never were in a team with good developers. So your conclusion about the big world of developers: is simply plain wrong. Unfortunately you live in a world of hire cheap, and fire if necessary. I live in a world where we hire excellence and try to make them never leave. And: we do code reviews. The guys not grasping the code get educated. Unless the code is in fact to complex and gets refactored.

For example: I do not know a single bad C++ developer. They are all top notch, not only in C++ but in basically everything regarding "code". However: we all shifted away from C++. Well, with the new fresh wind, see "circle C++" https://www.circle-lang.org/si... and https://github.com/seanbaxter/... it is perhaps time to take a look again :P Does Qt compile with circle c++? Oh oh ... potential potential ...

Comment Angeles Crest Highway (Score 1) 24

As I suspected, this crash happened on the Angeles Crest Highway.

https://ktla.com/news/local-ne...

"Multiple media outlets reported that Vince Zampella was in a Ferrari that hit a concrete barrier while driving on Angeles Crest Highway and subsequently caught fire. The California Highway Patrol, in a statement to KTLA, was only able to confirm the incident took place on Sunday at 12:43 p.m. at mile marker 62 on Angeles Crest Highway. "

Angeles Crest is a windy mountain road (one lane in each direction) popular with motorcycle riders and car enthusiasts out for a drive. Elevation goes up to 6000ft. You'll also get hard core cyclists doing the hills as well. This is the main road for access into the Angeles National Forest. There have been sections that have been washed out and repaired over the years. They finally reopened the entire stretch (there was a section out that cut LA off from the high desert) earlier this year:

https://www.sfgate.com/la/arti...

"A roughly 10-mile stretch of Angeles Crest Highway, which runs roughly east-west through the national forest for over 60 miles from the wealthy suburb of La Cañada Flintridge to the small mountain town of Wrightwood, reopened with little notice on Friday after being closed for several years. Before the surprise return on Friday, the portion of the two-lane highway had been closed since the winter of 2022-2023, when “relentless storms” collapsed roadways, caused rockslides and damaged retaining walls, according to Caltrans.

Angeles Crest Highway (also known as State Route 2) connects Interstate 210 with State Route 138, providing access to ski areas, hiking trails and picnic areas along the way. But for the past few years, areas along the closed stretch of roadway were inaccessible, and Southern California residents were required to drive in a giant circle along busy urban and suburban freeways to reach recreational opportunities near Wrightwood on the other side of the closure. "

Comment Re:Didn't see that one coming (Score 1) 131

So you're basically mad that MIT isn't the Thought Police for all their researchers, and they don't impose a dictatorial Single Opinion on them? And worse, you're mad they don't impose a Single Result!

I don't know if you've considered this, but perhaps the actual problem is that you're already an idiot, and trying to use AI like a brain prosthetic so you can pretend you're smarht?

Comment Re:No thank you. (Score 1) 56

Nio - and many others - made it pretty simple:
The battery is considered fuel. It is not part of the car.
Just like in your torch light.
Or just like 20gallons of gasoline are not part of the car, but fuel in a compartment.

The Nio cars (and others) is made to have its battery simply swapped in a minute or such. Just like refueling.

A random e-vehicle where the battery is an integral part of the car, can not simply be retrofitted for battery swapping.

Comment Re: 50.0 exactly (Score 1) 48

Shares with no voting rights, do not control anything.

If you and I make a company, you have 90% of the share and I have 10% and your shares have no voting rights: you have nothing to control. Simple. The only thing you can do is is "ask questions" to put a burden on the administration of the company.

I suggest do read the relevant laws about stock companies.

No idea about your lists, queues and deques. Lists of what? Shares?

What is next? When I own 5% of Apples shares, I can go to a random bank and can demand access to Apple's bank accounts?

Comment Re:Is this still capitalism? (Score 1) 48

They don't exist anyway.

My ticktock app works the same here in Europe as it did in Thailand last years.

The only difference is: I surprisingly get German adevertizing while I never got any advertizing before.

No idea why people who never used ticktock hate it. It is a video platform. People post videos about themself.
What the fuck is wrong with that? Randomly sprinkling adverts are completely obviously adverts, you scroll over them. Just like on any other "web site".

My ticktock stuff are videos about me traveling in Thailand: if you do not explicitly follow ME, you never see them, unless: you follow one of my followers/friends and they "share"/"repost" it, and it pops up in your stream, or you explicitly SEARCH for me - or search for content like: "farang in a Thai temple, making stupid comments".

Slashdot Top Deals

"Joy is wealth and love is the legal tender of the soul." -- Robert G. Ingersoll

Working...