Programming thread

PHP has some pretty good frameworks nowadays with deployment and VM tools surrounding them. The frameworks help eliminate a lot of the syntactic quirkiness and common security problems that used to plague it as well. The hipsters being busy off chasing shiny objects has almost helped it mature.
Yeah, I can believe that it's improving in the face of competition. But I don't know, the best thing PHP had going for it in the past was that it filled the "shitty tech but popular anyway" niche.

Javascript and Ruby have much better theoretical underpinnings than PHP. (Of course, while they're better than PHP, they're still not rigorous enough to keep the code bootcamp crowd from churning out reams of shitty code. But that's probably a pipe dream anyhow.)

It seems to me that they've stolen PHP's main selling point.
I used to work in an office downstairs from a coding academy. They would do 4-month classes and seemed to cycle to a new framework/language with each batch. They started with Ruby on Rails, moved to Node.js in the next one, and I think they're dicking around with TypeScript now.
Typescript is still node.js though. All the code is interoperable by default. Honestly, I think Javascript-as-a-platform is going to last for decades.

Kinda sucks though. OpenGL and web browsers made the same mistake by picking an actual language instead of a bytecode language. So now everyone's writing compilers that target Javascript, and losing the potential for a lot of optimization in the process.

Vulkan's not making that mistake, which I like.
 
I've been trying to get into programming in C, just haven't had a lot of time as of late. I'm probably going to try learning SDL or XNA/Monogame too.
 
C iS A BeAUTIFUL AND SiMplE lANgUAGE
https://curl.haxx.se/libcurl/c/10-at-a-time.html
Mocking-Spongebob-Meme.jpg
 
Typescript is still node.js though. All the code is interoperable by default. Honestly, I think Javascript-as-a-platform is going to last for decades.
The trouble with the coding academy kids is they don't understand interoperability and they don't understand the basic principles of computer programming. The conversations I had with them always opened with them asking "What's your stack?" in the hopes we were using whatever 6-month old framework they learned abut. Several of them asked if we would consider porting our 10 year-old codebase to whatever JS framework their class was about (no). It's rote learning and a scam.

Web applications are dirt simple now, the language hardly matters because as long as you have a MVC framework and a database abstraction layer it's going to be pretty much the same regardless.
 
C is dead for anything but systems programming. Thank God.
A lot of python's machine learning modules are implemented in C, and sometimes it's easer to just code in C when you want something to execute quickly. That said, even if it isn't as widely used as it used to be, I'm pretty sure it'll still be able to kill Rust.
 
I haven't programmed much of anything in years but I used to be okay with an ancient form of BASIC. Wanted to learn C or one of its derivatives for a while; but I could never self-motivate long enough.

How do you keep up the will to push forward with it when you get confused or frustrated by it?
 
The trouble with the coding academy kids is they don't understand interoperability and they don't understand the basic principles of computer programming. The conversations I had with them always opened with them asking "What's your stack?" in the hopes we were using whatever 6-month old framework they learned abut. Several of them asked if we would consider porting our 10 year-old codebase to whatever JS framework their class was about (no). It's rote learning and a scam.

Web applications are dirt simple now, the language hardly matters because as long as you have a MVC framework and a database abstraction layer it's going to be pretty much the same regardless.
Oh yeah, no, they have no clue what they're doing. It's cargo cult programming. If they bang on the drum, the money will flow like rain or some shit.
A lot of python's machine learning modules are implemented in C, and sometimes it's easer to just code in C when you want something to execute quickly. That said, even if it isn't as widely used as it used to be, I'm pretty sure it'll still be able to kill Rust.
Writing things in C unnecessarily is a bad idea. While it's technically true that "C == go vroom fast", if I had a programmer working for me wanting to write something in C, I'd really grill them over why.

Like you shouldn't do anything particularly complicated in C. At best, you should whip up a few, extremely simple routines that are hard to fuck up, and then wrap them to be used in your scripting language.

If there's any recursion, any trees, allocating any structures that need additional allocations of their own. Any of that fuckery, and you better have a damn good reason to be using C. Like it better be costing us a fortune to run an interpreted language.

The reason is is because allocations between libraries is a nightmare to deal with. Every library needs to define how memory is allocated and how memory is passed back and forth. And they all have different policies, and furthermore, they adapt their policies differently in different situations.

"Oh NewBignum_alloc will free its memory itself, but NewBignum_allocUnmanaged won't (but they both take pointers that the client is expected to free). Now if you pass them to BigNum_add, they both get freed (unless the dontfree global is set to TRUE)." It's just a mess of landmines.

Heh, if I was teaching a C class, I'd assign a project that involved manipulating trees. Something simple like turning a tree into a list of nodes. And they'd have to GET/POST the data from a web server using curl.

And then I'd link their programs up to Boehm GC. If their program showed any memory leaks, they immediately fail the assignment.
How do you keep up the will to push forward with it when you get confused or frustrated by it?
It's helpful to know whether a project is possible or not.

Some problems out there are computationally infeasible. But that's pretty rare.

So if you can figure out ahead of time that a project is possible, then it's easy to keep moving forward. If you know for a fact that it's possible, then at the very least, you can just try literally everything you can think of. Eventually you'll hit upon the solution. And that's a learning exercise for what to start with next time.
 
Heh, if I was teaching a C class, I'd assign a project that involved manipulating trees. Something simple like turning a tree into a list of nodes. And they'd have to GET/POST the data from a web server using curl.

And then I'd link their programs up to Boehm GC. If their program showed any memory leaks, they immediately fail the assignment.
You're a monster, you know that?

And yeah, I agree that making projects entirely in C is a bad move unless you have a really good reason why. I guess that's what you meant when you said C had already been forced into a niche, right? Since it seems like most programs I encounter are written in some kind of interpreted language. That said, I still think C will keep that niche to itself while Rust goes unused. The only project I know that uses Rust is the new "quantum" system for Firefox.
 
The trouble with the coding academy kids is they don't understand interoperability and they don't understand the basic principles of computer programming. The conversations I had with them always opened with them asking "What's your stack?" in the hopes we were using whatever 6-month old framework they learned abut. Several of them asked if we would consider porting our 10 year-old codebase to whatever JS framework their class was about (no). It's rote learning and a scam.

Web applications are dirt simple now, the language hardly matters because as long as you have a MVC framework and a database abstraction layer it's going to be pretty much the same regardless.
This is a major peeve of mine. Interoperability should be discussed at a much earlier stage of the educational process, it is sort of important after all.
 
You're a monster, you know that?
Haha, well, I'd feel bad in the beginning about giving an assignment but not telling people what they're being graded on. But honestly, if your C program has memory leaks, then your program is incorrect. By definition.
And yeah, I agree that making projects entirely in C is a bad move unless you have a really good reason why. I guess that's what you meant when you said C had already been forced into a niche, right? Since it seems like most programs I encounter are written in some kind of interpreted language. That said, I still think C will keep that niche to itself while Rust goes unused. The only project I know that uses Rust is the new "quantum" system for Firefox.
The niche that C has is as a glue language between other languages, or for kernels or low level hardware development.

A major mainstream category C has effectively been pushed out of is network servers. It's downright irresponsible to write network facing code in C.
 
Meh, you can go a long way towards interoperability by just making sure whatever you're writing can consume JSON. Even some services that don't operate over the internet use it now.
This is very true. It’s not necessarily difficult to ensure interoperability. There’s a major gap in understanding if you seriously think that migrating a 10 yr old codebase to your flavour of the month JS framework would be fun or profitable though, as per @SkeletonBias420
 
Getting really good at any one given UI library is a suckers game. Like if you'd describe your activity as "learning angular" (or react or whatever), it's probably a waste of time.

Reason being, all these frameworks recreate a lot of ideas that really should be in the language itself. They just implement it with normal language features like functions, structures, arrays, etc.

So your native language might have modules and inheritance. But then alongside the native concepts. you've Angular "modules" and Angular "inheritance". They've got weird semantics that can't be checked by the compiler. So who's doing all the footwork making sure you've got it working right? Yep, that's on you.

(And even then, you're never 100% sure you got it right. You'll be cruising along, thinking you're totally doing things by the book, and then you discover a random variable in your angular scope. Is that supposed to be there? I didn't put it there, fuck... my code seems to be working... should I say something? ffffuck...)

You end up being a human compiler for a new programming language that a community college grad with a degree in design thought was neat.

Pass. Leave that shit to the Indians.

I don't know, maybe learn one UI library for the sake of your resume, but don't kid yourself: you're not learning anything worthwhile.
 
It's tab. Spaces are for deviants.
And let the IDE decide how large they want the tab to be? I don't think so.

C is dead for anything but systems programming. Thank God.
Except when you want a portable dll with a stable abi, when you want to speed up python bottlenecks, when you want to write a library that can be called from many language or anything serious, basically.
 
A major mainstream category C has effectively been pushed out of is network servers.
haha no.
t's downright irresponsible to write network facing code in C.

Not at all. What do you think network drivers are coded with? And sometime for fixed fonction servers the line between driver and application doesn't exist.
 
Except when you want a portable dll with a stable abi, when you want to speed up python bottlenecks, when you want to write a library that can be called from many language or anything serious, basically.
1. C gets used as a thin wrapper for these purposes in other languages
2. Certainly.
3. See #1
Almost nothing that is newly minted nowadays gets written in C.
Not at all. What do you think network drivers are coded with?
Heh, how many new network drivers are written in a given year? And as a proportion of all publicly facing network code?
 
Heh, how many new network drivers are written in a given year? And as a proportion of all publicly facing network code?
what does it have to do with anything? You stated network facing code in C was irresponsible, regardless of how much of it is written in a given year. And as a volume of code shipped, most of the volume is the result of the compilation of C code. Code use matters more than code writing.

C is the lingua franca of programming. It's importance cannot be taken lightly. You cannot do serious programming without using it to some extent. There is a reason why linux distros comes with gcc installed by default and not g++.
 
Back