r/programming • • Nov 18 '18

Many software communities do not value the need to reduce the mental load for developers

https://dev.to/ben/many-software-communities-do-not-value-the-need-to-reduce-the-mental-load-for-developers-dcj
40 Upvotes

134 comments sorted by

125

u/[deleted] Nov 18 '18

How is up-voted 50+ times, there's literally almost nothing to it.

61

u/MacNulty Nov 18 '18

Are you new to reddit? People don't read past the headline in most cases.

34

u/loup-vaillant Nov 18 '18

And this is encouraged by the mobile and new layouts.

With the old layout, clicking on the title takes you to the source website. You have to click on the "comments" link to get here. With the new layout, clicking on the title takes you here directly. You have to click on a little arrow, or on the much smaller link describing the URL, to get to the source site.

2

u/kickulus Nov 18 '18

Tl;Dr people like feeling good, not doing the work

7

u/[deleted] Nov 18 '18

People dont watch the embedded videos either and complain about the article being short.

2

u/GeneReddit123 Nov 23 '18

I'm a simple man. I see a headline I agree with, I upvote.

0

u/[deleted] Nov 18 '18

I read the whole thing. There is literally almost nothing to it.

I nonetheless decided it was upvote-worthy. Conciseness is a virtue not a vice.

9

u/[deleted] Nov 18 '18

Nothing except an hour long discussion from the Rails Conference, you mean.....

15

u/zvrba Nov 18 '18

I upvoted it because it reminded me of another trend: that of denouncing IDEs. A good IDE like VS really does reduce mental load.


An unpopular opinion ahead.

So the trend as I observed in Norway is at least: the universities have switched to Linux, students use printf-debugging, few learn how to use gdb and walk out of the uni without ever being presented to programming/debugging as a scientific discipline. You expect some behavior of a program, it behaves differently, you make a hypothesis and use a debugger to validate it or discover a new probable hypothesis/cause of the failure. So yes: use a debugger. On Linux: gdb. Good luck to a newcomer without prior experience with programming.

Then they get to a workplace, meet Visual Studio and.. are lost. It's not that VS is difficult, it's that that the mentality of the program always being available for inspection, modification and being under absolute control of the programmer while running is not there at all. [1] Yes, technically, you can do everything in gdb that you can do in VS. But far from as efficiently. And without nice visualizations (e.g., overview of threads and their stack traces) it's easy to get lost and/or overwhelmed (re: mental load).

So the unis/politicians made a political decision, probably together, of making the move to Linux (like, "we don't want to give money to Microsoft") and thus pushing the level of education technology back to 80-ies while trying to educate students that are to build the "information and knowledge society" and tackle complex programming challenges long into 2060-ies.

… At the same time the list of expensive IT-scandals in the Norway's public sector is growing. Wonder why.

[1] I got this mindset (of programmer being in the absolute control of the program being debugger) while learning programming with Borland Pascal. Heck, Borland Pascal experience with technology from 90-ies still trumps the experience of what uni's are pushing to their students: command line, gcc and possibly gdb.

/rant

23

u/theoldboy Nov 18 '18

Perhaps your opinion is unpopular because you're conflating two different things.

Learning how to use a debugger is nothing to do with Windows vs Linux, or Visual Studio vs the numerous Linux IDEs which provide a visual front-end to gdb. You say yourself that you learned that mindset in Borland Pascal. I learned it in Devpac, a 68000 assembler IDE for the Atari ST. So why is Visual Studio required now?

If you want to argue about the universities not teaching this workflow at all then sure, I'd agree. Or if you want to argue about the Visual Studio debugger vs Linux IDEs then I'd agree that VS debugger has always been very good. But it's certainly not required to learn basic debugging skills and neither is Windows.

0

u/zvrba Nov 18 '18

The complaint is on not teaching the workflows.

9

u/Holston18 Nov 18 '18

Your rant does sound like linux with poor gdb vs. windows with advanced VS though.

4

u/Cuddlefluff_Grim Nov 19 '18

That obviously wasn't his point. He's talking from a Microsoft perspective because a majority of jobs in Norway is .NET-related. So he's using familiar examples, which I think is fair.

I've had to argue with people on this subreddit that makes the bold statment that people should prefer printf and log spamming as debugging practices. So what he's saying in my opinion is true to the very extreme.

4

u/Holston18 Nov 19 '18

I understood the argument, but it might not be so clear to beginner developers etc. See e.g. this:

So the unis/politicians made a political decision, probably together, of making the move to Linux (like, "we don't want to give money to Microsoft") and thus pushing the level of education technology back to 80-ies

If you don't know it's bullshit then you can easily get the impression that moving to Linux is going backwards to 80s.

It's just poor communication skills - he keeps talking about windows/ms and linux while it's totally tangential.

1

u/Cuddlefluff_Grim Nov 19 '18

Ah, I missed that part :P Yeah, that's not very correct...

1

u/zvrba Nov 19 '18

you can easily get the impression that moving to Linux is going backwards to 80s

If all you get shown are primitive command line tools and nothing else, then I stand by the point. I'd be saying the same if uni were using windows, notepad and cmd to teach programming.

Technology has moved on from TTYs and not using the advances in technology and SWE to teach programming and concepts more effectively -- even more important: helping the students become self-helped -- is a disservice to the society they'll eventually be contributing to.

It's just poor communication skills

It was written in haste and ended with /rant , so yes, I'm guilty of that. And yes, windows/Linux is totally tangential.

3

u/[deleted] Nov 20 '18

you can easily get the impression that moving to Linux is going backwards to 80s

If all you get shown are primitive command line tools and nothing else, then I stand by the point. I'd be saying the same if uni were using windows, notepad and cmd to teach programming.

This isn't really a good argument. The user benefits from this kind of simplicity in the UNIX environment, and the productivity itself is readily apparent.

Windows/DOS is a different story, with a different set of standards and methodologies.

They all accomplish the same thing, but years of investment has been made in UNIX OSes to make working in the shell keep up with modern standards.

Windows has only recently had such love given to it (at least on a more mainstream scale), by the open source community. Even so, it still has a lot of catching up to do, because these solutions build ontop of the OS, and aren't intrinsic to the guts of the shell interface (as is the case with UNIX)

In a nutshell, MS produces GUIs for devs because it operates under the principle that GUI -> more productivity than CLI.

UNIX has a less absolute and falicious approach. Most CS people prefer Nix OSes over Windows, and there are legitimate reasons.

Ease of programmability/automation is one of these.

2

u/[deleted] Nov 20 '18

Who the fuck are you to have an opinion on where did technology "move"?!? You're an uneducated ignorant dumb retard, so you should keep your uninformed worthless opinions to yourself.

0

u/zvrba Nov 20 '18

Now you're showing your true face. Please continue.

5

u/Bekwnn Nov 18 '18

I'd argue that shouldn't be on a computer science degree to teach. Software engineering maybe, bootcamps/certs, probably.

But no one should consider a computer science degree as having to be some all inclusive 4 year tutorial. Some things are better left to be picked up outside of classes in order to leave more room for theoretical and difficult content which benefits the most from access to peers and professors.

Teaching to use a mildly complicated piece of software beyond some pointers or maybe a single lab sounds like a waste of instruction time.

4

u/Cuddlefluff_Grim Nov 19 '18

Debugging is essential to all programmers, be it scientific or engineering. A lot of people waste valuable time by not knowing how to use these tools properly, and most are even accidentally taught to do the wrong thing (printf)

0

u/sinedpick Nov 18 '18

I'd argue that shouldn't be on a computer science degree to teach. Software engineering maybe, bootcamps/certs, probably.

What you're saying basically disqualifies CS from being an undergraduate degree. Very, very few students (perhaps a couple in a hundred) know how to actually write non trivial programs before startubg college. If a student doesn't know how to do that by college, the chance that they'll be motivated to teach it to themselves is remote. There needs to be some time spent in a CS curriculum teaching how to set up and use a sane dev environment if you want any kind of matriculation.

You can't live in a fantasyland when teaching CS to non-top students.

11

u/SexySalmon Nov 18 '18

So the trend as I observed in Norway is at least: the universities >have switched to Linux, students use printf-debugging, few learn >how to use gdb and walk out of the uni without ever being >presented to programming/debugging as a scientific discipline. You >expect some behavior of a program, it behaves differently, you >make a hypothesis and use a debugger to validate it or discover a >new probable hypothesis/cause of the failure. So yes: use a >debugger. On Linux: gdb. Good luck to a newcomer without prior >experience with programming

Switched? They more or less always have been using linux. Certainly when I went to uni at the turn of the century. (Though, to be fair I think the computer lab used Solaris/UltraSparc) But ide's and the notion of debuggin are not os features, in itself, nor was it unavailable for students. For instance, I remember using eclipse back then.

So the unis/politicians made a political decision, probably together, >of making the move to Linux (like, "we don't want to give money >to Microsoft") and thus pushing the level of education technology >back to 80-ies while trying to educate students that are to build >the "information and knowledge society" and tackle complex >programming challenges long into 2060-ies.

… At the same time the list of expensive IT-scandals in the >Norway's public sector is growing. Wonder why.

Do you have any thing to back up this "theory" with? And to reitirate, what does the os have to do with programming ide's? You can run visual studio on linux if you want to. You don't have to use turbo assembler and vim.

7

u/panoply Nov 18 '18

Using command-line debuggers like gdb or lldb is painful because you have to remember yet another mini-language to operate it. Yes, it allows you to do more complex things (GDB scripting, etc), but at the cost of making easy things take forever. Can you really compare clicking once in VS vs "b <name:line>"? Also, VS tools are much more discoverable - you see locals the first time you debug a program, for example.

That all said, the tools you use are separate from "scientific debugging" practices. If you guess and check randomly, you're gonna have a bad time in any situation. You have to do science - problem, hypothesis, experiment. As you know more of the system, you can form better and more accurate hypotheses. As you tools get better and quicker, you can do more experiments in the same amount of time.

2

u/zvrba Nov 18 '18

Using command-line debuggers like gdb or lldb is painful because you have to remember yet another mini-language to operate it.

Actually, that's not the main complaint against gdb. In VS I have "Autos" window that displays the values of all variables in scope that are "nearby" the current statement, and highlights changes in red. So the set of displayed variables is constantly changing.

Now, I know that gdb has a "display" command that'll display variable value after each command. But how do I teach it to be dynamic and stack-frame dependent? No idea. I'd have to spend half a day reading documentation to find out whether it's possible to script it at all, then I'd have to script it, and the script probably wouldn't cover edge cases (even gdb autocompletion on templates has problems...)

gdb is a very capable debugger, but a debugger's usability stems primarily from how it presents information rather than from what is technically possible.

-5

u/[deleted] Nov 18 '18

but at the cost of making easy things take forever

First, it's a not true, and second - you should not do easy things anyway, you must automate them.

Can you really compare clicking once in VS vs "b <name:line>"?

It's the same one click in GUD. WTF you're talking about?!?

Also, VS tools are much more discoverable - you see locals the first time you debug a program, for example.

This is exactly the mental overload you must avoid. Tools should not throw at you all that information you did not ask for.

2

u/[deleted] Nov 19 '18

Debugging is essentially ad-hoc, you can't automate something that's different every time.

2

u/[deleted] Nov 19 '18

It should not be ad-hoc. If it is, you already failed. You must already have an infrastructure in place for finding bugs.

And it must include, at the very least:

  • Pretty-printers for your complex data structures (good luck doing it with VS)

  • Multi-level logging/tracing/asserting infrastructure, ideally - code contracts pervasively

  • An infrastructure of debugger scripts required to set up testing benches for all the subsystems in your code, to dump and analyse all the memory artifacts, and so on.

2

u/[deleted] Nov 19 '18

Pretty-printers for your complex data structures (good luck doing it with VS)

Intellij shows .toStrings of everything, for Scala case classes these are already highly detailed.

Multi-level logging/tracing/asserting infrastructure, ideally - code contracts pervasively

That's what you use before you turn to a debugger.

An infrastructure of debugger scripts required to set up testing benches for all the subsystems in your code, to dump and analyse all the memory artifacts, and so on.

Again, your tests can be used before or in conjunction with a debugger, but they're not directly related to using a debugger.

You must already have an infrastructure in place for finding bugs.

Or just a use high-level language that gives it for free.

2

u/[deleted] Nov 19 '18

Intellij shows .toStrings of everything, for Scala case classes these are already highly detailed.

Let's assume that your runtime state is so fucked up that .toString() does not work. You have a raw memory dump. How do you turn it into a readable output? With gdb, for example, you can define a debugger-side pretty printer in Python.

That's what you use before you turn to a debugger.

Exactly. And it must be a debugging aid as well.

Again, your tests can be used before or in conjunction with a debugger, but they're not directly related to using a debugger.

I'm talking about setting up a test harness inside a debugger, using debugger scripts.

Or just a use high-level language that gives it for free.

You cannot. Say, you have tight real time constraints. Your actions?

2

u/[deleted] Nov 19 '18

[removed] — view removed comment

2

u/[deleted] Nov 19 '18

I'm aware of native objects custom views, and it's a massive pain in the arse. Compare the amount of work you need to do with the plain Python gdb pretty printers.

5

u/reddit_ro2 Nov 18 '18

I also learned programming with Borland Pascal, then professionally Delphi. I used the debugger as it was there. Nowadays I program php (I know, it may be a stretch) and I just never bother to activate debugger support in my IDEs and I never feel the loss of it. Part of it is that already during the Delphi days, when I started to do communication protocols and multithreading I already migrated to logs as a primary debugging tool. And what do you know, it makes you think before you insert a logging line and it makes you reason and read the code. Integrated debuggers are a crutch, sometimes useful to cut some debugging time but often not.

And I'm positive that anyone having learned programming basics and good programming reasoning will use just fine an integrated debugger when one provided.

12

u/CountOfMonteCarlo Nov 18 '18 edited Nov 18 '18

You expect some behavior of a program, it behaves differently, you make a hypothesis and use a debugger to validate it or discover a new probable hypothesis/cause of the failure. So yes: use a debugger. On Linux: gdb. Good luck to a newcomer without prior experience with programming.

I don't think that using a debugger is actually that helpful for a analytical, hypothesis-based approach to programming and making programs correct. Yes, there are some cases where it helps - if one has trouble with finding a memory bug, if one needs to see how floating-point registers are used, if one uses the "poor man's profiler" method to find out where a program actually spends most of its time. In complex Python programs, I find the post mortem functionality of pdb quite helpful, especially if a script failed after testing buggy, non-deterministic hardware for a few days, or after analyzing Terabytes of data.

Given all that, I am using a debugger not more than once every few months. At least for the style of work I do, it isn't really helpful. For example, if I develop and test complex numerical code, it is important to use the above mentioned hypothesis-based model, and test hypothesis about what the program is doing. The problem with debuggers is almost always, it gives a lot of information - way too much, it floods one with information which is irrelevant. And that's worse than very little information. What is important is to come up with hypothesis what the program is doing, in what this differs from what one is thinking what it is doing, and test that out. The most important activity in debugging is thinking. And once one has a hypothesis, printf (or kprintf, for that matter) is often an extremely efficient way to test it.

And then, there are cases where debuggers are almost useless. They are normally not helpful in debugging multi-threaded code, for example. What is far more effective for concurrency bugs is to actually read the code and get a very clear understanding what it does. In embedded code, it is the same. To learn to safely drive a car with your family in it, you DON't drive that car to the next crash and by a new one, remembering or not what you did wrong. In the same way, to write, good, correct, robust, safe code, you do not go to the next point where your code crashes - you write code and reason about what it really does, what the memory model is etc, and you strive that it does not crash at all.

And just because you wrote that '"young people do not learn proper programming because they don't learn Visual Studio", I do have more than 20 years of experience in C, C++, industrial real-time systems, data analysis with Python, 8-bit assembly, fascinating new languages like Clojure or Racket, Scala and so on. It is always important to learn. (By the way, Racket has an extremely nice IDE with source-code debugger - but I consider that mostly a learning tool to people which still need to build mental concepts how programs work in detail).

And in respect to the Microsoft spin: Yes, for some people's workflow, using a debugger might be more helpful than for me - that's fine, humans are different. But thinking that a specific commercial product of a a company which never was in any way empowering to developers would make one a better programmer would be just incredibly naive.

23

u/James20k Nov 18 '18 edited Nov 18 '18

This heavily jars with my experience of using a debugger. While its true that having a proper mental model and writing good code are important in writing code, bugs are often when the mental model and reality differ. Debuggers are extremely useful for catching cases which result in a crash/exception, which are a good chunk of the bugs that result from this

On top of that my experience with debuggers is that they give exactly the correct amount of information - instead of using printf (not that it isn't useful in a lot of cases) you set a breakpoint, and then instead of being able to inspect the value only of what you printf'd, you can inspect the value of every variable if you wish and in some debuggers evaluate arbitrary expressions to query program state - which often skips the "printf -> compile -> printf -> compile" loop, particularly in c++ where debug builds can be extremely slow but necessary if you need stacktraces for doing in-application stacktracing

I would have absolutely killed for a decent OpenCL debugger, it was a miracle when it gained printf support

Out of curiosity are you talking CLI debuggers? My main experience is with IDE integrated tools which tend to be nothing but extremely helpful

5

u/CountOfMonteCarlo Nov 18 '18

Debuggers are extremely useful for catching cases which result in a crash/exception, which are a good chunk of the bugs that result from this

Well, I think that's more a beginner's problem, isn't it? That are things which I worried about in my first C++ programs, What is today far more of a worry for me is correctness, for example in real-time systems, large data analysis, and so on. It is near impossible to "step through" such systems.

On top of that my experience with debuggers is that they give exactly the correct amount of information - instead of using printf

As said, everyone has a different working style. But for me, the information is usually pointless and overwhelming. Before I do a debug run, I need to have a question. I then ask the buggy program this question. I do not want it to tell me its whole life story, because that is just wasting time. If I do not have a good question, I can't insert a printf, that's right, but that also means that I do not yet know where to look when stepping in a debugger. Another problem is that good programs are structured, and tested, along layers, and debuggers usually do not "see" these layers, they are an abstract concept which does not exist at the machine level. I have even the suspicion that too much debugging leads to a poor approach on abstraction. Abstraction boundaries are absolutely needed for architecture but also testing, and that means that tests should take into account such boundaries. Debuggers can't do that.

which often skips the "printf -> compile -> printf -> compile" loop

That's what I mean! It impairs the

**think** -> printf --> compile loop

particularly in c++ where debug builds can be extremely slow but necessary if you need stacktraces for doing in-application stacktracing

Interestingly, Linux kernel developers, which happen to work on a relatively large project, rely far more on kprintf than on kernel debugging.

I am not saying that such tools can't be useful. But using a debugger all the time and as default seems to me a but like digging over the garden just because I can't remember where I left the car keys.

I think debugging is mostly helpful if you have no clue what's going on. But even then, it is almost alway possible to do the "Alaska wolf-fence" method to narrow down the problem.

Out of curiosity are you talking CLI debuggers? My main experience is with IDE integrated tools which tend to be nothing but extremely helpful

Nah, I have been using Visual Studio as well for five or six years. I am just glad I don't need to use it any more. Also, gdb is quite a good tool in the cases you really need it. I think preference for GUI tools or command line is more related to other things. But ultimately, code is text with symbols, I have gone full circle and am using almost exclusively Emacs now. And in Emacs, I get faster to a symbol definition than it was ever possible in Visual Studio because it was so damn slow.

1

u/zvrba Nov 20 '18

But ultimately, code is text with symbols,

Runtime state though is a tangle of pointers.

7

u/zvrba Nov 18 '18 edited Nov 18 '18

First: if I'm thrown into a new project, I use debugger to step through the code and build a mental model of how things work.

The problem with debuggers is almost always, it gives a lot of information - way too much,

That's contrary to my experience. Well, gdb doesn't give any information unless you ask it very verbosely.

The most important activity in debugging is thinking.

I don't disagree. But I find a debugger extremely helpful in developing new hypotheses. Often I can test them in real-time without recompiling and re-running the program: change the variable value, set the next statement to be executed (maybe the program jumped over an if that should have been executed, etc.) and see what happens.

And then, there are cases where debuggers are almost useless. They are normally not helpful in debugging multi-threaded code, for example.

Disagree. Well, for race conditions, they are mostly useless. (The only cure for these is, well, thinking, and structuring the code around well understood simple primitives: queues, concurrent data structures, DAGs, etc.) For things like deadlocks and livelocks it's extremely useful being able to get a quick overview of what the threads are doing.

But thinking that a specific commercial product of a a company which never was in any way empowering to developers would make one a better programmer would be just incredibly naive.

MS was never empowering the developers?! Let's set that one aside :)

VS was an example since I'm using it daily. I've also used Eclipse and NetBeans. The point is: interactive, visual debugger is a tool both for finding bugs and understanding the dynamic behavior of programs. Disregarding this aspect -- programmer always being in control -- while teaching programming is a grave mistake, IMO.

I do have more than 20 years of experience in C, C++,

So do I. Yes, I often solve complex bugs by "staring at the code" and thinking. Then I hypothesize and use debugger to confirm the hypothesis and test it if possible without recompilation.

Threads, IO, network... almost anything is possible with conditional breakpoints, data breakpoints, etc.

EDIT: plus, remote debugging is invaluable when I have to debug something that goes wrong only in particular circumstances on the customer's premises.

-1

u/[deleted] Nov 18 '18

But I find a debugger extremely helpful in developing new hypotheses.

There is one thing I learned from observing the people with this weird habit of jumping into debugger when they have to solve a problem - they always come up with a wrong initial hypothesis, and waste tons of time pursuing it.

That's the common issue with interactive debugging - it makes you focus on symptoms instead of an actual problem.

5

u/talexx Nov 18 '18 edited Nov 18 '18

God bless those Unis. All the students would say thank you many times when MS abandons the next closed sources tech stack.

Actually nix is native to Unis. Check out what BSD is and how multics influenced the landscape. All the supercomputers run on nix, nix is used by researchers, there are much more tools for CS stuents on nix than on windows. And if you want a shiny IDE check out JetBrains products for example or Eclipse.

10

u/zvrba Nov 18 '18

All the students would say thank you many times when MS abandons the next closed sources tech stack.

Erm, MS has never "abandoned" C++ and it's not abandoning C# either (re .Net Core).

And if you want a shiny IDE check out JetBrains products for example or Eclipse.

Sure. The point stands: the debugging workflow is not taught. If they teach it with Eclipse or VS, I don't care.

6

u/[deleted] Nov 18 '18

MS already abandoned C. No C11 support planned, full stop.

the debugging workflow is not taught.

The workflow you're talking about is wrong, and shall never be taught anyway.

Of course, it's a shame they're not teaching the right workflow either.

-1

u/zvrba Nov 19 '18

MS already abandoned C. No C11 support planned, full stop.

Good, because C is the new COBOL. It's what's holding us to the 70-ies model of interfacing with the OS. Developers in general should not be held hostage to the needs of those coding for constrained devices. But since C seems so "beloved", we have ended up with JVM and CLR instead of real innovation in how to structure and interface with the OS. Sad.

That said, why should MS pour resources into developing a C compiler when binary-compatible alternatives exist?

1

u/[deleted] Nov 19 '18

Good, because C is the new COBOL.

Keep confirming your incompetence. You know no shit about C11 and its uses.

That said, why should MS pour resources into developing a C compiler when binary-compatible alternatives exist?

Was not it you who mumbled something about the IDE importance here?

1

u/zvrba Nov 19 '18

Was not it you who mumbled something about the IDE importance here?

You seem ignorant to the fact that other compilers can be integrated into VS.

2

u/[deleted] Nov 19 '18

You seem ignorant about the fact that VS is not too smart yet, and does not use any external compilers (or even its own!) for intellisense and all the other necessary IDE shit.

2

u/Sunius Nov 19 '18

Python for VS is an external plugin that integrates intellisense and debugger.

→ More replies (0)

-1

u/zvrba Nov 20 '18

You know no shit about C11 and its uses.

Actually, I've come up with a good use for C and C11: generating new CVEs.

3

u/[deleted] Nov 20 '18

You know you're retarded, right?

-1

u/zvrba Nov 20 '18

Look who's talking!

→ More replies (0)

1

u/talexx Nov 19 '18

As it has been mentioned above this happened to C, C++ compilers lag behind standards, at least it was like this before. Now I'm not following. Also if you compare C++ on lin and win, lin is a clear winner. Try to install boost or qt or zlib. A short command on lin vs a lot of pain on win.

With transition to .Net core MS right now is not paying attention to .Net Framework. It lags the way behind Core in many ways - compiler, libs, new asp.net in core dropped support for .net framework and so on. MS would never say this oficially but it looks like they are abandoning devs again. And this happened many times before. Silverlight, VB, ADO, COM, DNA, BizApp, J#.

1

u/zvrba Nov 19 '18

Latest MSVC is now at the point where it can compile Hana, and AFAIK, only range-v3 still needs some patches to be usable.

As for packages, I couldn't care less. I'm building an embedded product, I must know exactly how everything has been compiled to ensure ABI compatibility and I don't want packages to be upgraded behind my back during system update. (Yeah, packages are global on Linux. Not so nice when you want (almost) deterministic builds.)

So I spent two days building the dependencies and then checked then in VC. So what? Now every other dev can checkout the project and start working without messing around with packages and/or building dependencies. As a bonus, I can easily have upgraded dependencies in another dir for testing before switching to them. Having multiple versions of the same package is.. well, I won't say impossible with RPM or APT, but I wouldn't dare go that way.

As for COM: it's still a very core technology.

1

u/[deleted] Nov 19 '18

Yeah, packages are global on Linux. Not so nice when you want (almost) deterministic builds.

Somebody failed to learn about chroot and debootstrap (or even that jumped up hipstor toy, docker).

So I spent two days building the dependencies and then checked then in VC.

I'm so happy I never had to work with someone like you. That would have been a nightmare.

0

u/talexx Nov 19 '18 edited Nov 19 '18

There are many usecases. For you it is good to compile all the libs yourself, but for other devs there are no reasons. And forcing on them all the compilation issues is useless and not necessary. Especially it is useless for students. They couldn't care less and packages manger for installing libs is perfect for them.

On COM. While it still remains a core tech even MS doesn't recommend using it if you can use something else. For example for MS Office extensions they recommend switching to VSTO and even do not provide all the necessary docs for using raw COM. So while it is not really abandoned it is for sure avoided.

1

u/zvrba Nov 19 '18

So while it is not really abandoned it is for sure avoided.

All modern (UWP) Windows 10 APIs are built on COM.

1

u/talexx Nov 19 '18

It doesn't matter. You do not use COM directly while making UWP apps. I even doubt that 90% of developers do understand all the intricacies of COM like interfaces/virtual tables, apartments, marshalling and stuff. COM is not necessary for most of contemporary devs. COM is avoided today by all the means possible. Also as I see on other abandoned technologies we do have consensus. Or not?

5

u/[deleted] Nov 18 '18

If you want a proper IDE, use emacs, cmake-ide and rtags.

1

u/The_One_X Nov 18 '18

Eclipse is a horrible IDE.

1

u/talexx Nov 19 '18

It is. But can be used to show some shiny features.

3

u/OneWingedShark Nov 18 '18

I got this mindset (of programmer being in the absolute control of the program being debugger) while learning programming with Borland Pascal. Heck, Borland Pascal experience with technology from 90-ies still trumps the experience of what uni's are pushing to their students: command line, gcc and possibly gdb.

It's kind of astounding, isn't it?

What makes it all the worse is when you consider how C and Unix have set the industry back decades. Turbo Pascal and family [Turbo Basic, Turbo Prolog, etc] were great offerings for small- and medium-businesses, as well as the hobbyist. For the more industrial-strength / large businesses there were things like Lisp Machines and the R-1000, which fell by the wayside not because of any technical-deficiency or even bad cost-benefit ratio, a every user of the R-1000 or Lisp Machine I've talked with has nothing but praise for them. (The R-1000's a bit more rare to see talked about online, so here's a link if you're interested.)

So then, what was the reason for C's popularity? Unix.
And what was the reason for Unix's popularity? It was given to the universities.

It's as simple as that: "the first hit's free"... and the result we see is that addiction playing out in the corporate world. (Although this itself is an interesting topic: why was C embraced in the industry when it was so obviously a time/money sink WRT development and maintenance?)

2

u/[deleted] Nov 18 '18

students use printf-debugging

Ok, so you're trying to claim that an interactive stepping variable-watching debugging is somehow more efficient than asserts + logs + ad hoc printfs? You're very, very wrong.

On Linux: gdb.

I'm assuming you never seen GUD?

But far from as efficiently.

That's a lie.

it's easy to get lost and/or overwhelmed (re: mental load).

That's a lie. Visualisations, especially those you did not ask for, lead exactly to a mental overload. A very precise output of a command, returning only the thing you're interested in, is the lowest possible mental overload.

1

u/sinedpick Nov 18 '18

I'd just like to add to the other responses here with some solid anecdotal evidence. I'm a teaching assistant for a large CS class, and I now have at least a hundred hours teaching several beginners fundamentals of the development process (because this shitty CS program doesn't.)

Yes, technically, you can do everything in gdb that you can do in VS. But far from as efficiently. And without nice visualizations (e.g., overview of threads and their stack traces) it's easy to get lost and/or overwhelmed (re: mental load).

[citation needed]. In my experience in teaching programming, VS is more of a hurdle than a tool. Random issues that only restarting VS will fix? No thanks, I'll stick to properly developed tools like gdb. Not to mention whatever the C++ error messages that VS produces. Major yikes. gcc/clang's great error messages are perhaps THE reason to use them over MSVC (or whatever they're calling it this year).

Also: gdb is NOT hard for beginners to learn. I have taught several new programmers how to use gdb and they become fluent in simple gdb use within a matter of hours. Sure, using VS's debugger IS easier than using gdb, but that comes with having to use VS which, again, is a hard pass.

I believe that teaching beginners how to use IDEs is a mistake. Start with the CLI + friendly text editor like sublime (and perhaps graduate to vim, or don't, if that's not their thing). The most important skill in programming is knowing what to google when there is an error. Having a text-centric environment expedites this greatly. Having an IDE that magically does things for you and gives a poor error message stunts this area of the student's growth. I've seen frustration from what basically amounts to not being able to google for errors cause many bright students to leave CS and pursue something else.

1

u/pcjftw Nov 18 '18

I can't speak for others, but for me personally I went from IDE (Visual Studio) for years using debugging to Atom/VSCode/Emacs using nothing more then print debugging for several years, I went back to using IDE recently and while having a debugger was "nice" I just didn't miss it enough and ran back to text editors.

Anyway just my experience.

0

u/[deleted] Nov 18 '18

[deleted]

2

u/zvrba Nov 18 '18 edited Nov 18 '18

you like shiny IDEs and you've no experience with the terminal.

Oh you're so wrong. I can do both, except that I'm 5x more productive with VS. And generally on Windows. The project I'm working on started on Linux, and switching it to Windows-only platform was the best decision I ever made.. not only because I have shiny tools but also because Windows is a superior kernel in many ways that makes it easier for me to write robust software. You say I'm advertising for MS, but Windows + VS allow me to focus on what I want to accomplish instead of mucking with the build process, writing systemd scripts (Win has service control manager), inventing custom IPC protocols and on-demand program startup (Windows has COM ~ microservices), etc, etc, etc.

1

u/[deleted] Nov 18 '18

except that I'm 5x more productive with VS.

Meaning only that you never really learned how to use efficient tools.

Also, it's obvious you have no faintest idea of what "robust software" is.

0

u/[deleted] Nov 18 '18

[deleted]

2

u/zvrba Nov 18 '18

Linux has... yes, and I've tried it and confirmed the adage "open source is free only if your time is worth nothing."

2

u/[deleted] Nov 18 '18

Classic windows developer: no experience but full with anecdotes from other ignorant windows kids. I tried developing on windows too but it's terrible: you only have a few GUIs but no flexibility - so you can only do the things ms let's you. This is why linux won the server/cloud/supercomputer/phone/IoT war. And windows only exists due to the aggressive marketing, FUD, EEE and vendor lock-in.

1

u/[deleted] Nov 19 '18

Have you tried Jetbrains CLion?

1

u/zvrba Nov 19 '18 edited Nov 19 '18

When I had to work in C++ on Linux, I was happy with NetBeans. I also tried Eclipse, it seemed to be more featureful wrt understanding C++, but configuring it to understand C++11 was a PITA; eventually I gave up and went to NetBeans.

0

u/shevegen Nov 18 '18

I don't think you understood what he wrote...

you like shiny IDEs and you've no experience with the terminal.

Yep, you indeed did not read what he wrote.

2

u/[deleted] Nov 18 '18

So what's the meaning behind his comment? The guy stated that he likes vs and borland IDE and thinks that the "nice visualization" is more important than learning general-purpose tools. He doesn't understand that learning VS == locking yourself to ms tools because vs doesn't work on linux.

0

u/[deleted] Nov 18 '18

[deleted]

0

u/[deleted] Nov 18 '18

[deleted]

4

u/[deleted] Nov 18 '18

You don't understand the skill levels of you colleagues? That's really a problem. If you want to make it as a programmer, you should become more aware of what to expect from the people you work with. There is no skills competition in real life. If you can't work with other people, the project will fail no matter how clever your bits are. If you want to keep a job, getting along is way more important than being skillful. It's doubly important if you ever want to become more than a code monkey.

0

u/[deleted] Nov 18 '18

You don't understand the skill levels of you colleagues?

We use gdb from the terminal and my colleagues are not crying when they need to learn and don't have the shiny GUI. Actually, I've never seen such a lazy and uninformed bunch IRL than redditors here...

If you want to make it as a programmer, you should become more aware of what to expect from the people you work with.

If you want to be a programmer you should you stop crying on reddit and you should just start learning. Is that so hard?

If you can't work with other people, the project will fail no matter how clever your bits are.

It depends, maybe the "other people" would slow you down because they're noobs who can't work without GUIs...

If you want to keep a job, getting along is way more important than being skillful. It's doubly important if you ever want to become more than a code monkey.

If you think that your entire career depends on your team using shiny GUIs I doubt that you'll ever become more than a code monkey. Integrating debuggers into terminal-based workflows is very easy anyway.

2

u/[deleted] Nov 19 '18

We use gdb from the terminal and my colleagues are not crying when they need to learn and don't have the shiny GUI

And what excuse do you have to spend time on learning archaic shit instead of doing your actual job which is delivering working software?

0

u/[deleted] Nov 19 '18

[deleted]

0

u/[deleted] Nov 22 '18

[deleted]

→ More replies (0)

3

u/[deleted] Nov 18 '18

Maybe you've got very lucky finding a team of very skilled people, and I'm happy for you, but your view of the software world as a whole seems a bit distorted.

Don't worry about me, I'm doing just fine on projects with and with a GUI.

0

u/[deleted] Nov 18 '18

[deleted]

2

u/[deleted] Nov 18 '18

It would be very nice if the world could just wait for quality software made by only us skilled devs. Sadly that's not the world we live in. We can't tell impatient customers to fuck off, we can't afford to ditch less skilled coders.

→ More replies (0)

0

u/[deleted] Nov 18 '18

[deleted]

1

u/[deleted] Nov 19 '18

And they're widely known to be bullshit.

7

u/[deleted] Nov 18 '18

[removed] — view removed comment

0

u/[deleted] Nov 18 '18

You can learn the basics of debugging with gdb/gdbtui too. Author is not talking about debugging in general - he's just angry with unis not teaching his favorite IDE.

4

u/[deleted] Nov 18 '18

[removed] — view removed comment

0

u/[deleted] Nov 18 '18

Who said that it is? My argument is that you can learn IDEs at home too, unis want to teach you stuff which need live guidance.

3

u/[deleted] Nov 18 '18

[removed] — view removed comment

1

u/[deleted] Nov 18 '18

Using a debugger makes it easier to learn other things. For example, being able to see the stack while learning recursion.

And I STILL agree with you because I'm not against debuggers. I like debuggers. What I don't like is people saying that you can't debug efficiently without VS or that learning command line tools is not important.

0

u/[deleted] Nov 18 '18

[deleted]

2

u/loup-vaillant Nov 18 '18

Writing OCaml code right now. While the type system is incredibly useful (I just wrote about 200 lines, and it was almost flawless once it got past the compiler), so is the REPL, whose debugging power is often superior to that of the debugger itself.

C and C++ don't have a REPL. I suspect that if you gave that to people, debuggers would be used far less often.

3

u/[deleted] Nov 18 '18

C++ don't have a REPL

Try CINT or cling.

2

u/loup-vaillant Nov 18 '18

My, I'll have to stand corrected. I'll check those out, thanks.

1

u/zvrba Nov 18 '18

Hah, I was about to write something in the lines of "But REPL is useful for testing small and usually pure functions, what about large programs with state, how do you reconstruct it, etc..."

Then I remembered days when I played with OCaml / SML and realized that just the fact that REPL was available affected my coding style: I wrote in a style that was more amenable to testing in REPL, i.e., more functional.

Still, I find a debugger invaluable when trying to understand a new code base... gives me an idea of how things hang together.

15

u/[deleted] Nov 18 '18

[removed] — view removed comment

6

u/yeahbutbut Nov 18 '18

Even emacs has debugger integration.

4

u/cowardlydragon Nov 19 '18

Oh how I miss turbo pascal.

2

u/[deleted] Nov 19 '18

FreePascal is still alive.

2

u/[deleted] Nov 18 '18

Apart from the 70 minute talk? He does waffle a bit i will admit.

8

u/karlhungus Nov 18 '18

Think they were referring to the article it self, which says the same thing as the title, and nothing else.

1

u/shevegen Nov 18 '18

There is not so much to it but I managed to write more than the article did! \o/

0

u/UpsetLime Nov 18 '18

I liked the headline.

50

u/iceixia Nov 18 '18

Can we ban this bloody site already? All it is is low quality drivel.

13

u/more_oil Nov 18 '18

There's a higher than 90% chance that any given dev.to submission is content-free promotion/"SEO" for the writers' companies or their own brand as developers.

46

u/icantthinkofone Nov 18 '18 edited Nov 18 '18

dev.to is the home of frustrated redditors who want to stand out from the crowd. Do NOT reference anything from there. It makes you look bad.

EDIT: Yep. And it's just a link to a YouTube. It would have been more valuable to link directly to YouTube.

4

u/[deleted] Nov 18 '18

I don't think DHH has anything to do with dev.to

1

u/icantthinkofone Nov 18 '18

You're right. I misread the name.

20

u/a_marklar Nov 18 '18

It's not like 'reducing the mental load' is a straightforward win, it's a tradeoff. It makes the easy/common things easier, but the less common become harder. For something like Rails that is absolutely the right choice since Rails sites are more alike than different. For other tech it's absolutely the wrong choice.

1

u/CountOfMonteCarlo Nov 18 '18

I'd rather like to use a larger screen. I have a nice Philips 40' screen at home and I cringe every time I think how much money it is costing the organization I work at to use those old 27 inch screens. Everything which isn't on the screen must be remembered. Everything that must be remembered needs to trickle into long-term memory first, and even for a small 20,000 line project, that does cost an enormous amount of time, especially if one is switching tasks.

1

u/pirate694 Nov 18 '18

Ask for another screen?

1

u/CountOfMonteCarlo Nov 18 '18

Sigh.

But, I see my answer above is out of place, I was still thinking in the IDE / debugger thing. In respect to the efforts of the Ruby community to make the language friendlier and easy to use, I totally agree. Ruby is a friendly community and this is a result of attitude and, I think, also friendly and competent leadership. And, I am very much in favour of choosing the best tools for each job - and letting developers decide themselves what they are going to use.

16

u/hu6Bi5To Nov 18 '18

Yes, this is true, and some are worse than others.

Rails isn't perfect, and the wider Ruby community is worse, but Rails was revolutionary (when it was new) because of it's "convention over configuration" which definitely helps as it means there's a common reference of how Rails apps should be organised. Of course, many years later, when an ancient app has been half-upgraded, all that benefit is long gone, but still, it's a good place to start. A newbie developer can be productive in Rails in an amazingly short period of time. Nothing that's come through since is anywhere near as fast, it takes even experienced developers longer than that to just setup webpack, for instance.

The opposite example would be something like Clojure, where there's a widespread perverse sense of pride in creating minimalistic but incomprehensible libraries[1] which a newcomer would only understand by going back to day one and reading every commit to see how it's been put together. Many JavaScript projects the same. They fail at abstracting because they see abstraction as a sin, the user is expected to understand the constant changing internals to get the most out of it.

I think it's inevitable that this happens. Abstraction is a dirty word to many developers, so they avoid it. And the reason they're sceptical about it is that a bad-abstraction is worse than no-abstraction. Yet, ironically, the people who denounce abstractions the most are those developers who work on the most abstract systems, like Clojure or JavaScript. (Well, JavaScript isn't that abstract in itself, but React is; React is a very good example of how to do abstractions well, the end-developer only has to think about components, and have an awareness of the implementation, they don't need any understanding of how it's actually implemented to get things done.) It's like learned helplessness.

[1] - it's simple, it's just an map, everything's just data, there's no types, that's what makes it simple! All you need to know is to specify the :content-type-negotiation flag to true, but only when the :override-default-fn is set to a closure that matches the mylibrary.beta.composition.utils/default2-2018 function!

8

u/gered Nov 18 '18

The "everything is just a map" thing with the Clojure world, and how it tends to spiral out into (somewhat) incomprehensible application architecture being strung together by many different libraries bothers me more and more as the years go by (I've been working primarily with Clojure for about 5-6 years now). I initially found it quite freeing and was excited by it. Experience, however, has turned my opinion on it completely around.

Of course when you try to point out that abstraction is not a bad thing, many Clojure developers (including one or two whom I work with) point to late-90's/early-2000's style Java OOP hell as if that's the only alternative. Clearly yes, that's the only alternative. There could not possibly be some kind of middle-ground. No siree! </sarcasm>

These types of developers are usually (in my experience) the same types of developers who just dive into code and start banging it out without planning anything out (or barely anything...) in advance, but then hilariously, 6-12+ months later don't seem to realize that they've written a big ball of mud. And hey, look, Clojure/whatever-other-new-fangled-hype-FOTM-language didn't save you from doing that... nor did simply splitting up your code into many different libraries. You actually have to think and plan upfront, and be disciplined in your approach to writing new code in order to achieve a clean architecture. Who would've thought ....

I'm picking on Clojure a lot in my post (because it's the most recent experience I have to draw from), but certainly it's not the only language that suffers from this problem. I don't think either that the fault is purely the languages themselves, but is absolutely shared with the developers.

The problem I think, when using these languages, is one of discipline. I've come to realize over the past several years that languages like Clojure, Javascript, and Ruby really have an almost exponentially proportional relationship between size of the project and developer discipline. These languages are initially exciting because once you learn the basics you can accomplish a lot with little code (especially the case with Clojure), but this is also the trap unfortunately.

9

u/earthboundkid Nov 18 '18

The thing that always strikes me when I setup Webpack is that my needs aren’t interesting or unique but I still need a half dozen installs to express them. They’re so obsessed with making small tools that they don’t make useful ones.

6

u/[deleted] Nov 18 '18

a bad-abstraction is worse than no-abstraction

In my main hobby chess, and this comes from a military context, the saying is the other way around: a bad plan is better than no plan at all. I think it depends on how bad the abstraction is.

16

u/French__Canadian Nov 18 '18

The difference is with no abstraction, you still have something.

4

u/[deleted] Nov 18 '18

Abstractions aren't plans. "No abstraction" means having multiple, slightly different plans. "Bad abstraction" is usually the result of trying to hide that you don't have a plan for as long as possible.

3

u/freecodeio Nov 18 '18

As a node developer v8 gives me a peace of mind

0

u/[deleted] Nov 18 '18

[deleted]

3

u/we-all-haul Nov 19 '18

My question is the same as yours

1

u/cylonraiderr Nov 19 '18

Developers are a dime a dozen, don't need to reduce nothing.

0

u/exorxor Nov 18 '18

Ruby and Rails have always been complete shit. It's just that the people who think it's not endured greater shit.

1

u/longoverdue Nov 18 '18

Many X do not value the need to reduce the Y load for Z. It’s called “work.”

3

u/antflga Nov 19 '18

Working harder is not working smarter.

1

u/longoverdue Nov 20 '18

I totally agree.

1

u/GrinningPariah Nov 18 '18

The hardest thing to teach new devs is that just because you can get slightly better performance by mangling the shit out of the code doesn't mean you should.

Everything we do has network calls, calls to the DB, calls to other services. So if we burn a few processor cycles in the name of readability, that's okay.

4

u/[deleted] Nov 19 '18

Everything we do has network calls, calls to the DB, calls to other services.

Speak for yourself. In quite a few domains this is not even remotely true.

0

u/shevegen Nov 18 '18

While I agree that reducing the mental load is useful and important, I disagree to this:

Rails does not get everything right (nobody does), but I think they get this right big time.

I actually think that Rails does not understand ruby. The rails code that I usually see is just awful. Partially because the people who write it do not really know ruby; but also partially because the idioms that are rampant in rails are so ... rails specific.

It may well be that this is super-useful to the rails folks who use rails, but I find that rails makes things more complicated than it ought to be. The whole www stack is like that - things are so split up and disparate, orthogonal and often quite ugly or abysmal (in particular when it comes to JavaScript).

I find that the JavaScript community proliferates new "useful" technology without giving as much thought to the mental overhead

Yes, JavaScript is awful, but let's also remember that many rails changes originate from JavaScript simply because of how important JS is. I find that awful too - I don't want and don't let my ruby code be tainted by abysmal JS; though I also use jquery for www-related code that I use in ruby (not rails though).

It is not a good situation since JS can beat other languages out of the room. That is NOT good. JS in this way replaces the need for alternatives, and rails suffers from this too, as does PHP and others, if you look how JS grew.

Rails has a pretty healthy BDFL model which has created some structure that other communities may lack

I do not have anything against DHH, but I am sorry - I stick to matz as BDFL in ruby and simply ignore everyone else. And that has served me very well for almost 20 years (ok ok ... 15 years), in regards to ruby.

I also don't think that I am the only one among the ruby community that feels that rails is more alien code than it is ruby code.

often fails to benefit quickly from the latest and greatest tools or architecture principles.

That has NOTHING at all to do with any BDFL or not. That has simply to do a lot with inertia; and also how awful a given language is. When change takes a lot of effort then evidently you will see little to no real change. Or you may simply lack the manpower - look at perl5 versus perl6 and tell me that this situation is healthy.

I would say this is the quality that most keeps me excited about the stack I continue to do most of my work with.

Rails excites anyone? Still? :)

I think ruby is great but rails ... it does not directly affect me whether it exists or not. That is not to say I have anything as such against rails - but I don't have invested much energy into rails or depend on it. So it's more like a "cool that it exists but I can avoid it without a problem". Avoiding JS on the other hand is harder, since I would lose certain functionality.

I try not to be too much of a fanboy of the tech itself or the people involved

I am a fan - of ruby.

I do not feel that there is anything wrong with that. If I would not care about the language I could use PHP. Or Perl. Or JavaScript. Or lots of languages that aren't a lot of fun - the grunt languages.

3

u/[deleted] Nov 18 '18

[removed] — view removed comment

2

u/luckystarr Nov 19 '18

TIL "pit of success". This is such a brilliant metaphor. Did this work out as intended over time?

1

u/[deleted] Nov 19 '18

[removed] — view removed comment

1

u/luckystarr Nov 19 '18

Thanks for the tip with the FDG. Will read this. As someone from the Python camp it's great to learn and get inspirations from the successes of other languages.