Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re: About that... (Score 1) 135

Python the programming language (as opposed to Python the syntax) isn't "easy to learn", it's fucking hard. No offense, but crappy code in Python usually comes from people who think it was easy to learn. What they write isn't Python, it's horse shit with a Python syntax.

Python has very specific paradigms and ways of doing things; a lot or advanced concepts, very different from C/C++. And if you don't understand those to the core (which BTW takes 1-2 years if you were a good programmer to begin with, several more if Python is one of your first languages), things blow up in your face, fast and hot. And yes, they blow up at runtime, not at compile time (not going to excuse that, it's an unfortunate thing... it's just the way it is).

Then again, with halfway decent unit testing, stuff generally works. There's a reason why "It compiles, ship it!" is an evergreen joke in C/C++ circles.

Comment Re: who's using C ? (Score 1) 135

FORTRAN wasn't on my list because it's strictly speaking not a "real" language, pretty much like SQL. You don't write GUIs, wrb servers, or DB connectivity plugs in FORTRAN. It's a language specifically for "math stuff", to me...

The name gives it away :-)

And when you've written your math stuff, you slap a decently modern API layer on it and call it "numpy" or something :-p

Comment Re: who's using C ? (Score 1) 135

Exactly, jusy the other way around: the more help your IDE offers, the crappier the code we write.

I never had any problems whatsoever knowingly precisely what my current j, j, k... means: because I get nervous if my fuctions don't fit on an 80x25 terminal, and outright frantic if they pass 50 lines. More than 2 levels of indentation (full level, 8 char tab, or 4 char if I'm in Python), and I'm shifting restlessly in my chair. Try doing that will all your code for the whole project, and you'll realize quality becomes a lot better.

Try writing code with norhing but Nano or something similar - no debugger, no auto complete, no class overview... if your code sucks, your project ain't goin' nohere :-) It breaks apart before it reaches any rebalance of considerable size or importance.

Most people tend to write code at the limit of their understanding. With help from the IDE they push their understanding a little further... so writing a language which is impossible to write without autocomplete and advanced code navigation IDEs is sonfar out of my world it's not even funny anynore.

Comment Re:who's using C ? (Score 1) 135

In principle yes... and no.

I understand your point, but I have two objections. First, it's "just a library". Yes, part of the standard, but... pick a C string / vector / whatever library and make it "part of the standard", and we're there. There's nothing inherently magical about the STL.

The the actual use case and impact on the community: what use is it really, given C++'s underlying language peculiarities?

Take vectors and lists for example: the last I looked (admittedly >5 years ago), if you had Boost vectors, and STL vectors, and you built a math library on the former, you couldn't use it on data represented by the latter. So "having a standard library" is an advantage just on paper... because C++ actually has at least two libraries (Boost and STL) that people were likely to use, and the very construct of C++ -- strict type checking -- would prevent any library based on one to interact with the other, even if they were made to be source-level API compatible.

(Though last I was involved there was talk of Boost entering the C++ standard, effectvely merging boost and STL... maybe this already happened and my rant isobsolete? But still I feel the point is valid for any other C++ library...)

Comment Re:who's using C ? (Score 2) 135

Java has its own WTFs. (I don't have first hand experience, but I managed a team of Java programmers at one point in my career.) With Java, you end up building factories upon factories upon factories upon diagrams in the end. Large OO projects in general tend to blow up simply because 2 years down the line, you realize that your 50:50 decision about how to start a class hierarchy should've swayed the other way.

Sooner or later you end up with "quick" 3k lines of code copy & paste & slight modification simply because it's easier than refactoring the OO hierarchy.

And try writing Java without massive help from autocomplete, search, inspect... IDEs.

(And no, I'm not considering JavaScript a sane alternative to anything.)

Comment Re:About that... (Score 1) 135

I personally refuse to work on large python projects unless mypy and ruff are strictly enforced.

I've seen people (actually sent patches to GitHub projects) that got hard-ons about static code checking and linters... and rejected my code multiple times over simple whitespace issues. Yet had the most horrible, most insane flow and architecture: not robust, easily destroyed by (likely to occur) future benign changes in input data etc.

So consider me biased.

Also, there are those who absolutely love strong typing, and those who don't. Don't get me wrong... I "grew up" with it. I know how to handle it. And I'm doing it in my head all the time. But I've also spent countless hours of my life -- time I'm never getting back -- refactoring software only to satisfy the type checker because I built the object hiearrchy on the wrong side of a 50:50 decision...

Comment Re:who's using C ? (Score 4, Interesting) 135

I prefer to write Python for purely practical reasons; but as someone who routinely chooses C whenever they don't write Python (...and I used to be very proficient in C++ back in the day, maybe until 2020-ish), here's why: it's simply a fun language to write software in. It's like driving a go-cart :-)

Any alternative out there is blown out of proportion, brings in little value, for a cartload of WTFs in return.

C++? What does it offer above C? Objects and exceptions, you can have most those in C too (just takes a bit of time of writing some simple frameworks, but exception propagation is a feature of the CPU, not the language; there are C system calls for that). Memory management? C++ doesn't really manage memory, you just get better tools to do it yourself. If you're disciplined, you can do it in C. More stringent typing? Yeah, that introduces a lot of restrictions (again, without real benefit), that C++ then spends half of its overwhelming might on solving again... if you're a "safe programmer" by design, C is just as nice to write as C++, just less of a headache. And if you aren't, C++ won't prevent from shooting yourself in the foot -- it will just give you a railgun to do so instead of a rifle.

Java? Don't know Java (intimately), but any language that can't be written with a text editor seems like a waste of brain cycles.

What else is on the list? C#? I never quite shook the idea that it's an MS-only party (yes I know, there's a Linux version of that ecosystem), but... what problem does it actually solve that C++ or Python doesn't?

SQL is not a "programming lanugage".

JavaScript neither, but people keep trying... (inconsistent type system, global namespace pollution, scoping hell...).

Rust is probably interesting. This is why it's gaining. But the software world is much, much larger today than it was in the '90s, so... it takes some sweet time.

Comment About that... (Score 4, Interesting) 135

Python is the top language solely because it is used to teach beginners, and those beginners never move on.

I consider myself to be a seasoned programmer, and my language of choice these days is Python, for purely practical reasons.

For reference, I earned my first money off that by the end of last millenium, in my late teens. I started out seriously learning programming with C in self-learning, if we ignore the brief first contact I had with BASIC in 3rd grade. (It said C++ on the book cover, but it was actually a bad style of C -- I realized that many years later.) I eventually learned "real" C++ and spent literally decades writing software, in C or C++. And I still love C and prefer it for occasional projects.

But my goto everyday language, unless I have a specific reason to choose something else, is Python. It was just about phasing out its 2.7 versions when I started writing serious software in it.

Reason is simple: interoperability owing to its "duck typing". The module dependency system is a joke, yes. But look at the science world: there's at least half a dozen array / numerical calculations systems out there in Pyhton, and they all play ball. Meanwhile no other general-purpose application language has ever reached that.

And it's not just calculations, it's many other things like data access ("file" paradigm), I/O etc.

Python is not really a "lanugage", it's more of an interface. If you need some specific thing, you go ahead and implement it in whatever you need (Fortran, C, C++, ...) and slap a Python API layer on it: *boom*, instant access to a huge ecosystem of whatever, from cluster computations, to GUIs, to device programming, to databases, to web, ...

(I do have a bad conscience for not having learned Rust yet though, FWIW.)

Comment Re: Subjective anyone? (Score 1) 282

In 2025 the word "slacker" shouldn't even exist. We have industrial automation, mechanized agriculture, AI and othet gimmicks. US GDP is around 100k per head, that's around 4-500k for a typical Simpsons-like family. Yet such a family earns on average 80k.

There's zero justification for anyone in the US to have to work more than a day per week. That's the "slacking" boundary.

Comment Re: -40 degrees (Score 1) 117

see a pattern ofna split personally on your side (or something).

First you say:

There was no context for them to even mention Kelvin

To which I say:

But they did mention Kelvin

And then you:

I specifically brought up them mentioning Kelvin

Dude. Words have meaning. All of them. Everybody in your head needs to get onnthbsame train bfore you use them to.sharw your inner state with the outside world.

Slashdot Top Deals

Would you people stop playing these stupid games?!?!?!!!!

Working...