Live data from Hacker News

Learning to program is getting harder

allendowney.blogspot.com

371–380 of 422 posts

Re: Learning to program is getting harder

#372
post #194

Things are so much easier to program these days. Compare c or asm or cobol to php,ruby, python or modern javascript things are much easier at a higher level of abstraction.

> php,ruby, python or modern javascript

But do you really understand those? Do you have a complete mental model of how they work down to the fundamentals?

For C and even C++, I can confidently say YES.

Re: Learning to program is getting harder

#373

It's getting harder because it's become fashionable to shun IDEs that make most of these issues obsolete, and have done so since at least the 90's. It's ridiculous to expect newcomers to a language and/or programming in general to slog through a 20 or 30-step environment setup process. This idea that using an IDE will discourage someone from finding out the more detailed workings of the language, compiler, etc. is no…

Yeah if anything it's people moving away from IDEs that's making life much more difficult. The complicated part of an install is rarely ever just downloading some software, clicking the executable and then 'next' a few times. The hard part is docker throwing out nonsensical error messages into your console, offering 3 equally illegible possible solutions, which after 2 hours of googling and attempts turn out to be wr…

>The hard part is docker throwing out nonsensical error messages into your console, offering 3 equally illegible possible solutions, which after 2 hours of googling and attempts turn out to be wrong, because all you needed was a reboot to get to the next error (which ends up being caused because of one of the 3 attempts to fix the earlier problem).

Are you talking about kernel updates breaking docker until reboot? Yes that's annoying but you have to reboot anyway.

Re: Learning to program is getting harder

#374
post #367
post #364

As someone who makes developer courses / training material I think it's a really bad idea to use online services like PythonAnywhere or Cloud9IDE. It's really important to learn how to set up your own development environment as a developer and if you're making this content, I believe it's our responsibility as teachers to show people how to do this. Personally I use Docker in my courses (because it's what I use for m…

I think I'm in the group that doesn't immediately see the obvious gain of teaching in a Docker container vs. teaching how to install pyenv/virtualenv. Is it mainly cutting out troubleshooting differences between host OS's while also getting isolated python environments? Maybe I do see the win there, after all?

I think you're starting to see it.

By the way, everything isn't just thrown into a single container. We use Docker to set up the whole app over a series of containers.

So postgres, redis, the flask app and celery all run in their own containers.

Without Docker, you're responsible for getting not only virtualenv set up, but also installing postgres and redis on your box, which is wildly different on Windows, MacOS and Linux.

From a teaching POV, it's easier to level everyone off with Docker, but from a student's POV, it's also easier because now they don't need to worry about any of that. It lets them get to the important material faster. They can just install Docker and run a simple `docker-compose up --build` and they are good to go.

Compare that to listing out a million steps to install python, setup virtualenv, write special clauses for people on Windows or MacOS, etc.. It's a huge burden for everyone, and it's the main reason why I started using Docker for my own projects years ago.

We haven't even talked about installing multiple versions of postgres or redis without Docker too (because apps tend to be developed at different points in time), or deploying an app to production. All of the steps you do to set up a typical real world Flask app on Windows and MacOS are thrown out the window without Docker because your production box is likely running Linux, but with Docker, it's pretty much the same.

Re: Learning to program is getting harder

#375
post #290
post #144

Earlier quoted context omitted.

The article is specifically discussing the ease of getting into an IDE on a new PC. When I started, I could turn on the PC, type “basic”, and press enter. Now, at minimum, I would need to know to start notepad, save an html file, point a browser at it, and type some html and js boilerplate. That’s what the article says is harder (except the article goes on to discuss installing other languages, which is even harder).

For many people in the 90s, trying to program a "game" or anything like that often involved C++. Try figuring out programming _and_ linking libraries you have to download off the internet (all before we had the kind of resources we have now). The IDE wasn't enough, you needed to set a bunch of stuff up. And using any GUI? OK now you're learning Win32. Sure, maybe it was easier to write the "number guessing game" in a…

This is an extremely bad characterization of how far people went with BASIC.

Re: Learning to program is getting harder

#376
post #291

Earlier quoted context omitted.

> Having taught some introductory CS courses a few years ago, the amount of struggling with basic things like file naming, directory hierarchies, and even simple hardware use was a constant distraction. Or to put it the other way: users (future would-be programmers) are being distanced[sic] from how the machines work. Even at the most rudimentary level. Frankly, I'm not surprised. Interfaces are systematically being…

Familiarity with how computers work arguably peaked during the early-mid PC era. The first computer that I used was an IBM 360. Basically, someone showed me how to punch cards, and how to enter my data. After submitting the job, I'd find out the next day whether it crashed, or completed properly. And after a few tries, I got my results. But nowhere in that process did I know anything about IBM 360s, or how to program…

> With an IBM XT 286, on the other hand, it was all in my face.

Earlier in the pre-PC age, for the hobbyists you had similar experiences with home computers like Tandy RadioShack, ZX spectrum, Commodore Vic-20 or 64, not to mention the Amigas and Ataris (and all the others I’m old enough to have forgotten).

Early Macs also let you mess around (and mess up) your system too.

It was an exciting time in computing indeed, but it did in no way start with the PC.

Re: Learning to program is getting harder

#377
post #339

Earlier quoted context omitted.

For me it's the opposite. A modern IDE is significantly easier to understand, with far less mental baggage than some hacked together combination of several CLI based tools. The mental drain of clicking some nice green play arrow on screen when you want to execute code is non-existent. The baggage of remembering which tool does what, what weird flag you have to keep adding to one of the commands you need, what keyboar…

CLI tools are all about codeveloping the build environment with the project. Instead of you trying to remember the weird flags, write a one-line shell script and save it with the project. For example, my current side project is built on C+SQLite. The larger chunks of SQL are plain text files so that I don't have to worry about C string escaping. Instead of trying to read them at runtime, I have the build process wrap…

Just to give you an idea of how you would do that in Delphi (even in 1996):

1) Drop an instance of your database-specific query class (or a generic database API query class, such as ODBC, ADO, etc.) on a form or data module.

2) Click on the property editor button next to the SQL property for the class instance in the object inspector.

3) Input your SQL in the provided window (or load/save to/from a file, whatever the property editor allows for).

4) Compile your application.

That's it. The SQL is now automatically included as a resource in your executable and is available to you at runtime as if it were assigned at application startup. And this isn't just limited to SQL - you can do this with any text or binary file. It's all only limited by the imagination of the developer of the component(s) that you're using in the IDE.

Visual Studio has always been a bit more obtuse in how it handles datasets/databases, so it's probably more of an example of how not to do something like this in an IDE.

The point is that a beginner can do the above, whereas I'm not sure that a beginner would even know where to begin when it comes to implementing what you've done (which is very well done, putting all of this aside).

Re: Learning to program is getting harder

#378
post #344

Earlier quoted context omitted.

Most manholes are round because that is the most practical shape such that the cover cannot fall in. There are actually other shapes, but they are usually hinged and most costly.

I've never thought about it, but a circle of the correct size has no less reason to not fall in than say a square or triangle of the appropriate size. I.e. if it's smaller than the hole, it'll most likely fall in. My theory: They're heavy, so making it a circle at least eliminates the need to "align" it when putting it back. You can basically just drag it using a hook and it'll slot itself into place.

The difference is that this "appropriate size" (= cost of materials) is smaller for circles than it is for any other shape.

Re: Learning to program is getting harder

#379

Earlier quoted context omitted.

It's not. Installing a C++ tool chain two decades ago is much harder than any current environment.

Really? I remember it being rather easy circa 2003. On Windows, you could download an installer for Dev-C++ or the Borland compiler, install it like any other program, and you were done. On virtually every other platform, you didn't have to do anything at all: the system came with a C++ toolchain ready to go. I'd say it's still just as easy to get going with those sorts of tools now, and the same goes for many other…

You had to install Visual Studio then the Windows SDK then probably other libraries. Then spend an afternoon to set environment variables and project settings until it can compile anything.

Dev C++ and code blocks had a an easier start, although they were bugged to death and only used for hello world projects.

Borland is paid software. There was a free edition was very challenging to obtain. That certainly contributed to the death of the company.

If we talk about two decades strictly. There was no internet so you couldn't find any tutorial or help page. Books were selling for $50 each and you couldn't Ctrl+F them.

On Linux a newbie can "gcc -o helloworld.c" to compile his first C file. Then there is a massive gap until he will be able to compile multiple files with make, auto tools, manage external libraries and package anything to run on another computer. Now it's 2018 and Linux still doesn't have a C++ debugger.

Re: Learning to program is getting harder

#380

It's getting harder because it's become fashionable to shun IDEs that make most of these issues obsolete, and have done so since at least the 90's. It's ridiculous to expect newcomers to a language and/or programming in general to slog through a 20 or 30-step environment setup process. This idea that using an IDE will discourage someone from finding out the more detailed workings of the language, compiler, etc. is no…

> Shun IDEs Well, I don't think anybody is "shunning" IDEs just to be difficult; it's just really, really hard to describe something in the context of an IDE. For one thing, IDEs are (obviously) graphical, so you have to include a screenshot if you want to refer to something. Worse, IDEs change things around a lot (sometimes for no particular reason). Then of course, there are no standards in this area - in Java you…

It's not really that hard, though. Almost everything you see in an IDE is just a pretty version of something in a text file somewhere. IDE's don't get rid of project files, source files, object files, etc. They just simply manage the complexity in a way that keeps what you need at your fingertips.
Post reply on HN