• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

Mr.Mike

Member
The replacement phase is now, I think. Systems are so massive that large C++ codebases are just leaking ships, they'll never be able to seal all of the memory leaks, buffer overflows and threading issues. Basically when you hit a certain scale, you can't just trust tooling and code reviews to save you because those 1 in a billion edge cases happen too frequently, you need mathematically provable models. cpp_is_king is right that those codebases are just too big to throw out but now that we are seeing viable replacements in the system-programming space, new projects are going to reach for C++ less frequently and new devs are less likely to learn it as a primary language.

Rust was created for exactly this reason too, and now Mozilla is starting to replace old parts of Firefox with new parts written in Rust. (I recall a headline about rust being required to build Firefox now).
 

Kansoku

Member
I just graduated (Computer Science), so I can be considered a new programmer. I might be talking out of my ass here, but still...

I've felt that people always wanted a C++ replacement, but since nothing better showed up, they were "stuck" with it. To me, the more they add to it the more bloated and messy the language feels. Kinda like the name it's but with stuff thrown in afterwards. To be fair I used very little of it in some classes, so I can't say for sure, but the more I read about it the more messy things looked like.

I also feel Rust has a real chance of eventually replacing it. The way I see it they are doing everything right. Memory safety and speed, coupled with zero cost abstractions that make it easier to develop with. As more notable people use it (like Dropbox using it to rewrite part of their infrastructure in Rust) it will gain traction and eventually be the first choice for new projects. I know that if I ever need to do something more performance critical I will definitively choose Rust.

It might even be possible (though I can't say it's likely right now) that it will penetrate other areas as well. Mr.Mike mentioned Rocket. I think that "market" will be really hard to get in (I say this as a Java back-end developer). Enterprise like Java due the stability of the language and the maturity of the whole ecosystem. Startups like Ruby on Rails (and sometimes Python with Django) due to how easy it is to get a fully functional prototype up and running with it. Eventually they might move away from it due to how slow Ruby with Rails is, but still. It's going to be extremely hard to dethrone Java, but I can see it happening.

Rust was created for exactly this reason too, and now Mozilla is starting to replace old parts of Firefox with new parts written in Rust. (I recall a headline about rust being required to build Firefox now).

Yep. Or rather it's needed to build Gecko, which Firefox uses.
 

Koren

Member
I think that's Go's niche. Enormous growth in Go this year while C is in large decline - at least according to Tiobe.
I sure hope not...

I've felt that people always wanted a C++ replacement, but since nothing better showed up, they were "stuck" with it.
If they haven't found better languages, they haven't searched. The only two thing missing to alternatives were (and still is) libraries/code available and people knowing those languages.

But with 10% of the efforts invested in C++, we would have far better alternatives.

To me, the more they add to it the more bloated and messy the language feels. Kinda like the name it's but with stuff thrown in afterwards.
I agree... but they patch in C++ most of the things that appear useful elsewhere so it kinda keeps floating, so that's to be expected.

(I kinda like C++, but let's be honest, it's an awful mess, and it's getting worse)

Interestingly enough, I think it may be something that help something else to settle. C usually feels to limited for some low-level tasks, and C++ is now bloated. And since the gap is widening, something should happen.

I also feel Rust has a real chance of eventually replacing it.
I don't think a single language will replace C++. Its usage is just too broad. From very low-level to GUI development (Rust still hasn't a proper GUI development solution, has it?), a successor that suits every user seems impossible to find.

Startups like Ruby on Rails (and sometimes Python with Django) due to how easy it is to get a fully functional prototype up and running with it. Eventually they might move away from it due to how slow Ruby with Rails is, but still.
Ruby on rails may be impressive, sometimes. Its usage is on the rise, if I'm not mistaken...

It's going to be extremely hard to dethrone Java, but I can see it happening.
I think (and personally hope) that Java will go away before C/C++. I can still see reason of using C/C++. I have hard times finding one for Java (but maybe that's just me).
 

Kansoku

Member
Interestingly enough, I think it may be something that help something else to settle. C usually feels to limited for some low-level tasks, and C++ is now bloated. And since the gap is widening, something should happen.

That's a good thing for Rust tho, and it falls nicely in that gap.

I don't think a single language will replace C++. Its usage is just too broad. From very low-level to GUI development (Rust still hasn't a proper GUI development solution, has it?), a successor that suits every user seems impossible to find.

Well, sure. C++ has a enormous range. There are and will be more "specialized" languages, like how Python is really strong in the scientific community, but as far as performance critical stuff I think Rust design being based on safety and speed will help it a lot to find it's place in this "niche".

Also as far as GUI, there is some, but they are still very early: https://github.com/kud1ing/awesome-rust#gui

I think (and personally hope) that Java will go away before C/C++. I can still see reason of using C/C++. I have hard times finding one for Java (but maybe that's just me).

The good thing about Java is that it has everything. If you want to do something there probably is a mature library that allows you to do it.

But yeah, I would rather see it gone as well. It has some good ideas, and I think that rethinking the whole JVM thing may lead to some interesting stuff, but as it is I don`t quite like it.
 

Kalnos

Banned
I don't really see Rust getting popular for web dev any time soon. Most people want the path of least resistance and that's leading to increased adoption of languages like Go where the standard library has everything you need to get rolling.
 

Wollan

Member
In the short term you will probably see an uptake in TypeScript for web application development, seeing as it's a subset of JS and lives in harmony with all existing libraries/NodeJS, as it's pretty standard to transpile now anyhow.
Once WebAssembly (which is to go 1.0 in Q1 2017) is in version 2.0 or 3.0 then you will probably start to see more diverse web development environments with JavaScript being 'just another language' that compiles to this target.
 

Somnid

Member
In the short term you will probably see an uptake in TypeScript for web application development, seeing as it's a subset of JS and lives in harmony with all existing libraries/NodeJS, as it's pretty standard to transpile now anyhow.
Once WebAssembly (which is to go 1.0 in Q1 2017) is in version 2.0 or 3.0 then you will probably start to see more diverse web development environments with JavaScript being 'just another language' that compiles to this target.

I don't see either really. Typescript has some interesting ideas that I think ECMAscript may eventually build on but it doesn't look it will gain major adoption, angular 2 adopted it but angular seems to be getting dumped for React (and even that has a couple of new flavor of the months beating down it's door). Basically it looks like the only gain for strict typing would be performance but transpilation won't provide that unless it's to asm.js/wasm and so there's not a huge reason to adopt. It's just like coffeescript.

As for wasm, it's hard to say. People will be allured by performance but the whole DOM has sort of become so related to js it's hard to see any serious language replacement. It's probably going to look more like FFI for js.

I really want to know what happened to soundscript. That seemed like a way forward but I wonder if interest fizzled at Google.
 

Makai

Member
I think (and personally hope) that Java will go away before C/C++. I can still see reason of using C/C++. I have hard times finding one for Java (but maybe that's just me).
Just like idealists of today look back to Lisp and ML...I imagine the idealists of the 2040s will think of Java 1.0 as the pure and better way. "Objects, encapsulation - it's so simple! Lambdas and generics - ick!"
 

Koren

Member
That's a good thing for Rust tho, and it falls nicely in that gap.
It probably can, yes... There's plently of usages of C++ for which it isn't mature enough yet, though.

like how Python is really strong in the scientific community
Is it? I haven't seen Python that often in research labs, although I can see it a popular choice. Since it's the official language for science prototyping here for a large part of students that will become scientists and researchers, I have no doubt it'll be more common soon, in any case.

Just like idealists of today look back to Lisp and ML...I imagine the idealists of the 2040s will think of Java 1.0 as the pure and better way.
Damn, you're talking about a severe Alzheimer pandemia...

(I would have thought that ML has some momentum, though... OCaml is still strong, and F# is rising)
 
Python is definitely popular in my college among the scientific community. Almost all our machine learning work happens on python due to available library. Although I have seen many people still use C++. But i am still a student so my understanding of everything is still not at professional level lol. But among engineering students i still think most use matlab than python.
 

Kansoku

Member
As far as I understand, Python, MATLAB and R are the big three used in sciences and math. As far as I know, R is strong in the statistics and finance kinda stuff, Python in biology due to machine learning and MATLAB in engineering and image processing.
 

Koren

Member
I can confirm that Matlab is still hugely popular in topics like fluid mechanics (and its ever-expanding toolbox will make replacement not an easy thing) and signal processing

Fortran is also still used a lot in some fields, including astrophysics (not as awful as it seems, btw).

Many people in particle physics use... C++ interpreters, with JIT compilation (used to be CINT with ROOT, I think they're replacing it with Cling). I remember it being strange... for example, IIRC, it often didn't mind if you mixed . and ->

There's probably as many languages as there are fields. Most researchers aren't interested in learning something else, so habits are strong. And since you'll have to use code from other people when you begin, it's quite stable.
 

Wollan

Member
I don't see either really. Typescript has some interesting ideas that I think ECMAscript may eventually build on but it doesn't look it will gain major adoption, angular 2 adopted it but angular seems to be getting dumped for React (and even that has a couple of new flavor of the months beating down it's door). Basically it looks like the only gain for strict typing would be performance but transpilation won't provide that unless it's to asm.js/wasm and so there's not a huge reason to adopt.
The official Typescript transpilers come with JSX compatibility now (using the .tsx extension) so it's well tailored to work with React (Office 365 components are written in it).

While the transpiled result from TypeScript is ES5, where it comes into its own today is its function as a working-format. You get type security, you can re-factor methods way easier as everything has type signatures and class belonging. If you're writing larger web-apps then there's big benefits here.

And hopefully when the day comes that WebAssembly is mature one can compile to that target from existing TypeScript work and enjoy the performance boost.
 

upandaway

Member
Is it? I haven't seen Python that often in research labs, although I can see it a popular choice. Since it's the official language for science prototyping here for a large part of students that will become scientists and researchers, I have no doubt it'll be more common soon, in any case.
I know some labs in my uni that are full on python (in neuroscience, NLP and machine learning). Now that you mention though it those labs are headed by pretty young professors
 

Koren

Member
I know some labs in my uni that are full on python (in neuroscience, NLP and machine learning).
Neuroscience / machine learning, I'm not surprised. The benefits are too obvious to ignore, and it's fields close to CS, where people are more willing to change their tools if it's useful.

In many science fields, people are more interested in the actual research than in details of development, even with benefits. Which I understand, it's not as if coding was a task you learn in a couple of hours.

I worked in a signal processing lab, I've been given the task of cleaning some Matlab code. I started by vectorizing loops, and seeing how it would be used, I asked permission to go full C++ (it's not as if it would be upgraded, they're still using it nearly ten years later, so the lack of C++ coders wouldn't be a huge issue). I haven't won an order of magnitude, but three (1000x). Going from hours to seconds changed a lot of things ^_^. Instead of analyzing hours of data, we analyzed years.
 
I'm thinking the same, too. C++ will be replaced when we'll look for an alternative, not when an alternative is available. Better languages (keeping the same advantages) are already available, even if they don't have the manpower behind them..


Probably, although each time C++ "eats" such a new feature, its syntax becomes uglier. When you add grammar special rules to deal with grammar conflicts, you know it's getting bad.

That being said, I think that, when C++ will be replaced, in 15, 30 years, it still may be by a language appearing now. The moment languages gain momentum doesn't have much in common with the moment it's created. And in any case, each time people create C++ replacement, they come with interesting ideas that could (will) be a basis for the replacement.

I think the entire reason new features get added is to make the syntax cleaner, not uglier. It's just that there are a lot of new subtleties introduced.

Do you have a specific example in mind where syntax became uglier? It sounds like you were referring to a double >> being ambiguous between a streaming operator and a double template terminator (e.g. foo<bar<int>> vs foo<bar<int> >, but IMO they made the syntax cleaner by allowing it, at the expensive of making the compiler more complicated).
 

Koren

Member
Do you have a specific example in mind where syntax became uglier?
I had, but I don't remember it, and that's utterly annoying (it's not >>, I'm fine with this from a user point of view, even if it can make lexers harder to write).

It was something that should have been correct (it is in normal cases), but since the syntax clashed with something else, the compiler refused it, and needed a workaround to understand it. Template-related, I think.



I agree they're working on disambiguation, which is utterly needed. I mean, uniform initialization in x11 is welcome. Let's take:
Code:
int foo( int(x) );

How many people would believe that this line create an int called foo, initialized with the result of int(x)?

How many would know that you have to write
Code:
int foo( ( int(x) ) );
to declare such an int, because
Code:
int foo( int(x) );
for historical reasons and a lot of freedom for the programmer in use of parenthesis, is actually meaning
Code:
int foo(int x);
thus is the declaration of a function?

So yes, now you have a non-ambiguous way to avoid the problem. But the result is that you have an additional syntax, which should be used by everyone but isn't, which doesn't help. Not that it's C++ specific, but C++ has been rushed a bit, extended an awful lot, and, for all I like using it, I think it's bloated and often counter-intuitive.

I could back a C++ variant that break compatibility and directly use the better choices and only those.

Honestly, I could write parser for many languages... For C++, I wouldn't even try. Obviously, it's doable (or there wouldn't be compilers), but still....
 

Slo

Member
Honestly, I think python is preferred for NLP and ML because 1) it's efficient at processing vectors and 2) it's dead simple. Let's face it, most Data Scientists are stats nerds, not programmer nerds. Why learn the ins and outs of a "big-boy" language when all you're planning on doing is opening a CSV file and iterating over it over and over and over?
 
Honestly, I think python is preferred for NLP and ML because 1) it's efficient at processing vectors and 2) it's dead simple. Let's face it, most Data Scientists are stats nerds, not programmer nerds. Why learn the ins and outs of a "big-boy" language when all you're planning on doing is opening a CSV file and iterating over it over and over and over?

Why not R?

Edit: Nvm, that was covered already.
 

Ovid

Member
Hi everyone.

I've been lurking this thread for about two months now and it has given me some valuable information on programming. I'm currently working through the book "Learn Python The Hard Way" but I feel that I need the discipline of school to really learn to code.

I plan on finishing my Economics degree in Fall 2017 or Spring 2018 and I'm thinking about pursuing a second degree. Should I go into CS or CIS? I heard that CS is more theoretical and want to learn something more applied to supplement my Econ degree.

Which one will employers value more?

Thanks.
 

Makai

Member
Hi everyone.

I've been lurking this thread for about two months now and it has given me some valuable information on programming. I'm currently working through the book "Learn Python The Hard Way" but I feel that I need the discipline of school to really learn to code.

I plan on finishing my Economics degree in Fall 2017 or Spring 2018 and I'm thinking about pursuing a second degree. Should I go into CS or CIS? I heard that CS is more theoretical and want to learn something more applied to supplement my Econ degree.

Which one will employers value more?

Thanks.
Econ. Minor in CS.
 

Somnid

Member
Why minor in CS?

Is there a particular reason why you think I should minor in it instead of pursing a second degree?

If you want to learn software or get into software as a career, degrees aren't actually all that important. It's a lot of money for not a whole lot. Start with a code school and then get some real world experience.
 

Koren

Member
I'm currently working through the book "Learn Python The Hard Way" but I feel that I need the discipline of school to really learn to code.
Well, that's a personal feeling, but I would find logical you have hard time with this. I loathe this book. Not because I disagree with everything (in fact, I share many ideas... such as actually typing the code), but I still think the result is awful.

(Yes, I know I'm not the target, but I teach to people who *are* the target)

Not that I have alternative to suggest, though :/
 

Ovid

Member
Well, that's a personal feeling, but I would find logical you have hard time with this. I loathe this book. Not because I disagree with everything (in fact, I share many ideas... such as actually typing the code), but I still think the result is awful.

(Yes, I know I'm not the target, but I teach to people who *are* the target)

Not that I have alternative to suggest, though :/
LOL.

I've been supplementing it with the MIT 6.00 Intro to Computer Science & Programming videos on YouTube. This course uses Python.

I watched some of the Harvard CS50 videos but it was confusing the hell out of me because it was mainly C.

If you want to learn software or get into software as a career, degrees aren't actually all that important. It's a lot of money for not a whole lot. Start with a code school and then get some real world experience.
Thanks.
 

Slo

Member
If you want to learn software or get into software as a career, degrees aren't actually all that important. It's a lot of money for not a whole lot. Start with a code school and then get some real world experience.

I'm conflicted about the obsolescence of CompSci degrees in favor of YouTube and Udemy. I understand the sentiment of telling people to just dive in and start coding rather than pay to get a CompSci degree, and I can easily see how someone who's got real world experience may initially be much better suited to contribute to a software team on day one than some theory-only dweeb with a BS degree but no experience. The part I struggle with is how to you then retroactively teach that guy all of the high level concepts that he missed out on? I think those things are still valuable, and pretty hard to pick up on your own for the average Joe.

I think it would be easier to teach an structural engineer to swing a hammer than it would be to teach a hammer swinger about structural engineering.
 

Makai

Member
Why minor in CS?

Is there a particular reason why you think I should minor in it instead of pursing a second degree?
You already accomplished the main goal of college - exposure to many new ideas and meeting interesting people. You will become proficient by writing lots of code on personal projects. Investigate subsets of programming when you become curious. My path looked something like this:

procedural programming - C#
object oriented programming/design patterns - C#/Java
functional programming - Haskell/F#/Swift/Lisp/Scheme/Clojure/Scala/Kotlin/OCaml
low level programming - Rust

Other stuff like C and Javascript were mixed in there too, but that was the general theme. I started making simple games in C#, then school taught me techniques to build bigger programs. Then I got jaded by unsolvable bugs at work and learned techniques to prevent them - went a little too HAM here. Then I got jaded by the performance of purity in realtime games, and here I am. Next big level-up will probably be compilation or assembly.
 

Somnid

Member
I'm conflicted about the obsolescence of CompSci degrees in favor of YouTube and Udemy. I understand the sentiment of telling people to just dive in and start coding rather than pay to get a CompSci degree, and I can easily see how someone who's got real world experience may initially be much better suited to contribute to a software team on day one than some theory-only dweeb with a BS degree but no experience. The part I struggle with is how to you then retroactively teach that guy all of the high level concepts that he missed out on? I think those things are still valuable, and pretty hard to pick up on your own for the average Joe.

I think it would be easier to teach an structural engineer to swing a hammer than it would be to teach a hammer swinger about structural engineering.

There is an upper bound if you don't have the math but it's not that hard as long as you have a decent math background. I mean if you can understand Big O then you're suited for 99% of all programming jobs.
 

Kalnos

Banned
If you want to learn software or get into software as a career, degrees aren't actually all that important. It's a lot of money for not a whole lot. Start with a code school and then get some real world experience.

That's easier said than done from what I have seen. There are always code school students begging for jobs in my city's slack community and most places don't seem too willing to pick them up considering they will just have to train them. Unless you meant something else by real world experience. Definitely try to make some small projects in your spare time if you can for sure.

I don't think university is essential or anything but I definitely have connections I otherwise wouldn't have and there are certain doors that open up only if you have a degree.
 

Koren

Member
Well, it wasn't a joke, and that's really annoying. I take suggestions.

There's good online courses and ressources, there's books I like for other "targets" (I enjoyed Dive into Python, but that's definitively not for anyone), but I'm at a loss when someone wants me to suggest a book for beginners.

It's just that a bunch of bad books don't become a bunch of good books just because you can't find good ones...



Since Python is now an nationwide official language for high-school studies, there's many new books appearing, but they're often not that good.

I mean...

Chapter on stacks

"We will implement stacks using lists

Pop is done by L.pop(0)
Push is done by L.insert(0, elem)" (sic)

Way to go... Let's have a push/pop that's O(n)!

Sometimes, you wonder where editors find their writers...
 

Koren

Member
Unless you meant something else by real world experience.
I'm pretty sure he thinks about collaborating to a project if you can't find a job right away (and probably still collaborate to a project if you can find some free time and motivation even if you find a job).
 

Somnid

Member
That's easier said than done from what I have seen. There are always code school students begging for jobs in my city's slack community and most places don't seem too willing to pick them up considering they will just have to train them. Unless you meant something else by real world experience. Definitely try to make some small projects in your spare time if you can for sure.

I don't think university is essential or anything but I definitely have connections I otherwise wouldn't have and there are certain doors that open up only if you have a degree.

Your Udemy courses aren't resume material and those only get you to learn the tools, not the trade. You need a real project under your belt somehow. Whether that be doing some work for a friend, suckering someone into hiring you, open source work or whatever. It's just as bad being a comp sci grad without an internship. Your code is going to suck and you have nothing to show so nobody is going to want you. However you get through the door, the real skill will come on the job. That's really it. Companies looking for programmers look at 2 things: what you've done, and some test of your skills. Degrees and paper certifications are generally a non-factor.
 

Slo

Member
Companies looking for programmers look at 2 things: what you've done, and some test of your skills. Degrees and paper certifications are generally a non-factor.

From the job postings I've seen, that's definitely the exception and not the rule. Perhaps that is more common in ultra-progressive start ups, but most places big enough to have an actual HR department filter their candidates based on some basic criteria of their resume, namely either extensive work experience, a degree, and preferably both.
 

Somnid

Member
From the job postings I've seen, that's definitely the exception and not the rule. Perhaps that is more common in ultra-progressive start ups, but most places big enough to have an actual HR department filter their candidates based on some basic criteria of their resume, namely either extensive work experience, a degree, and preferably both.

Extensive experience yes, and a degree in something. Econ would be fine. Though 2 of my co-workers don't have formal degrees so even that's still on the table.
 

Kalnos

Banned
Anyone here work on mission critical stuff? How on earth do you deal with the anxiety?

Jesus christ.

How you deal really depends on what kind of company it is and how long you are actually able to stay away from it. Best advice I can give is to actually relax and do things you enjoy on your free time and resist the urge to be a workaholic.

Definitely make sure you figure it out though because stress can cause some crazy issues which in my case was problems with my teeth.
 

Kinokou

Member
Is it okay to kind of come in here and whine a bit?

I have the last couple of days been looking into programming languages on codeacademy (Python and Java).

Previously I had done the HTML and CSS course and enjoyed it a lot and even had some practical use of it in making some fancy looking emails and stuff, I know some might say these aren't "real" coding or whatever, and I'm not here to take that debate. I happened to enjoy it found it fun, creative and rewarding that I could see immediate results from every single change I did from the very beginning to end.

Now with Python and Java, I'm not that far into any of the courses really (reached some stuff about conditionals and workflow in both), but I'm feeling totally crushed by the abstraction, lack of practical application and immediate results. There are some other outer factors adding my mood hitting bottom, but right now it feels like I will never get any this at all.

I'm very much a do it myself person and I kind of do want to learn because of practical uses I can immagine for it, and I guess at a certain level it would feel rewarding to actually complete something, but all of that seem so far off and hopeless now.

I will have to admit that I had some tiny fun with string formatting and else if stuff since it seems to be the closets to something actually tangible, almost like a tiny text rpg going on, but instead of that being something that's built on the courses kinda just move on into new tiresome and abstract lessons in a vacuum where I again fail to see the use of what I'm doing and what practical applications it might hold.

All in all it is a very frustrating starting experience and I'm unsure if I'm interested in following up on the courses on codeacademy since it all just seems useless right now (and also since the math parts of boolean false/true stuff on the python course are absolutely off putting).

/rant

Now that I'm done whining out my frustrations, maybe you fellow gaffers have some recommendations for other sites or tutorials that will suit me a bit better?

At the moment I don't really care whether it's java or python or something else. I just want something that feels grounded, practical and has tangible results and progression that directly builds on what I have done previously instead of slinging me into a blank slate for every new step.
 

Eridani

Member
Is it okay to kind of come in here and whine a bit?

I have the last couple of days been looking into programming languages on codeacademy (Python and Java).

Previously I had done the HTML and CSS course and enjoyed it a lot and even had some practical use of it in making some fancy looking emails and stuff, I know some might say these aren't "real" coding or whatever, and I'm not here to take that debate. I happened to enjoy it found it fun, creative and rewarding that I could see immediate results from every single change I did from the very beginning to end.

Now with Python and Java, I'm not that far into any of the courses really (reached some stuff about conditionals and workflow in both), but I'm feeling totally crushed by the abstraction, lack of practical application and immediate results. There are some other outer factors adding my mood hitting bottom, but right now it feels like I will never get any this at all.

I'm very much a do it myself person and I kind of do want to learn because of practical uses I can immagine for it, and I guess at a certain level it would feel rewarding to actually complete something, but all of that seem so far off and hopeless now.

I will have to admit that I had some tiny fun with string formatting and else if stuff since it seems to be the closets to something actually tangible, almost like a tiny text rpg going on, but instead of that being something that's built on the courses kinda just move on into new tiresome and abstract lessons in a vacuum where I again fail to see the use of what I'm doing and what practical applications it might hold.

All in all it is a very frustrating starting experience and I'm unsure if I'm interested in following up on the courses on codeacademy since it all just seems useless right now (and also since the math parts of boolean false/true stuff on the python course are absolutely off putting).

/rant

Now that I'm done whining out my frustrations, maybe you fellow gaffers have some recommendations for other sites or tutorials that will suit me a bit better?

At the moment I don't really care whether it's java or python or something else. I just want something that feels grounded, practical and has tangible results and progression that directly builds on what I have done previously instead of slinging me into a blank slate for every new step.

I've personally never tried either, but I've heard good things about:

If you want more web development, I've heard really good things about The Odin Project, which teaches you how to create a website from start to finish, with each step building on the other. It uses Ruby on Rails, which is pretty close to python, as well as HTML, CSS and Javascript, so it does teach you more advanced coding than simple HTML/CSS.

In the completely opposite direction, there's also nand2tetris, which teaches you how to create Tetris from scratch (it's not really about Tetris though). Interesting if you want to learn more about how computers work, although it looks like it gets quite hard later on so it's probably not the best idea unless you're really interested in the subject.

I can also definitely tell you that all those things you think are useless right now are actually really useful. They might not give you tangible results right away, but everyone ends up using these basic things a lot later on.
 

Makai

Member
Is it okay to kind of come in here and whine a bit?

I have the last couple of days been looking into programming languages on codeacademy (Python and Java).

Previously I had done the HTML and CSS course and enjoyed it a lot and even had some practical use of it in making some fancy looking emails and stuff, I know some might say these aren't "real" coding or whatever, and I'm not here to take that debate. I happened to enjoy it found it fun, creative and rewarding that I could see immediate results from every single change I did from the very beginning to end.

Now with Python and Java, I'm not that far into any of the courses really (reached some stuff about conditionals and workflow in both), but I'm feeling totally crushed by the abstraction, lack of practical application and immediate results. There are some other outer factors adding my mood hitting bottom, but right now it feels like I will never get any this at all.

I'm very much a do it myself person and I kind of do want to learn because of practical uses I can immagine for it, and I guess at a certain level it would feel rewarding to actually complete something, but all of that seem so far off and hopeless now.

I will have to admit that I had some tiny fun with string formatting and else if stuff since it seems to be the closets to something actually tangible, almost like a tiny text rpg going on, but instead of that being something that's built on the courses kinda just move on into new tiresome and abstract lessons in a vacuum where I again fail to see the use of what I'm doing and what practical applications it might hold.

All in all it is a very frustrating starting experience and I'm unsure if I'm interested in following up on the courses on codeacademy since it all just seems useless right now (and also since the math parts of boolean false/true stuff on the python course are absolutely off putting).

/rant

Now that I'm done whining out my frustrations, maybe you fellow gaffers have some recommendations for other sites or tutorials that will suit me a bit better?

At the moment I don't really care whether it's java or python or something else. I just want something that feels grounded, practical and has tangible results and progression that directly builds on what I have done previously instead of slinging me into a blank slate for every new step.
Just pick what you want to make and start hacking away until it works. Google when you are stuck. Text RPG is an easy starting place.
 

Koren

Member
Is it okay to kind of come in here and whine a bit?
Definitively...

I can understand how it can feel annoying to learn without obvious benefits. I always try to find (pseudo) reasons to write algorithms when I teach CS, because while a small percentage of my students can love coding because they enjoy the mental gymnastic, most get bored easily if they don't see what it can be used for.

So I look for small games (guess the number, tic-tac-toe), basic information processing, basic cryptography, small math puzzles, etc., anything I can find.

Maybe you should look into websites that allows you to solve problems, such as codewars. Not all problems are great (some are actually bad), but you may enjoy solving more and more of them, alongside learning some algorithmics basics.

If you can stick to a single language, at first, I think it would be better (Python is probably easier). Should you need to know both, you can catch up later with the other.

An important question, though: why are you learning Python and Java for? Have you considered Javascript first, since it may allow to do more things quickly, if you're already fluent in HTML/CSS? Not that I think Javascript is a great first language, but at least, it can help motivation...

Just pick what you want to make and start hacking away until it works. Google when you are stuck. Text RPG is an easy starting place.
Could work, indeed, although the first google searchs may be hard to write... Don't hesitate to post here if you're stuck, in any case.

In the completely opposite direction, there's also nand2tetris, which teaches you how to create Tetris from scratch (it's not really about Tetris though). Interesting if you want to learn more about how computers work, although it looks like it gets quite hard later on so it's probably not the best idea unless you're really interested in the subject.
That's interesting... I used to teach algorithmics to young teens (and sometimes their bus driver that couldn't resist trying ^_^) by coding an online Pong. The graphical part and the network communication part was of course totally transparent, but it's interesting when you want to teach variables, loops, conditions (for bounces), etc.

Not my idea, but I've wanted to create an online ressource around a similar idea, most probably for Python (it was a kind of pseudo-code, with some things abstracted, great for introduction, but limiting after that). Tetris seems a great idea. Any other game that you would see promising?
 

Eridani

Member
Definitively...
Not my idea, but I've wanted to create an online ressource around a similar idea, most probably for Python (it was a kind of pseudo-code, with some things abstracted, great for introduction, but limiting after that). Tetris seems a great idea. Any other game that you would see promising?

Snake is good choice. I had a university course where we had to program that in assembly and it was fun, and not terribly complicated. Tetris seems like a great idea, but programming piece rotations is a pain, especially if you want them to work properly with walls.
 

Koren

Member
Snake is good choice. I had a university course where we had to program that in assembly and it was fun, and not terribly complicated. Tetris seems like a great idea, but programming piece rotations is a pain, especially if you want them to work properly with walls.
Well, it's an introduction to coding, there's no real problem with not allowing a rotation if there's a conflict (and you can do interesting things later by dealing with this issue, I rather see this as an interesting difficulty).

The obvious alternative would be Columns, but Snake is an interesting idea. Maybe a different game per chapter? I remember enjoying Reversi as an introduction to AI, too...
 

Eridani

Member
Well, it's an introduction to coding, there's no real problem with not allowing a rotation if there's a conflict (and you can do interesting things later by dealing with this issue, I rather see this as an interesting difficulty).

The obvious alternative would be Columns, but Snake is an interesting idea. Maybe a different game per chapter? I remember enjoying Reversi as an introduction to AI, too...

What I really like in Snake as an introduction to coding is that:

a.) It's a great use case for lists, so it involves some basic data structures, which is cool. Especially since lists are usually so inferior to arrays you rarely ever get to use them, even though they are always one of the first data structures to be thought. Not that this matters much with python, but it's still cool.

b.) Figuring out that you can represent movement just by moving the last snake element to the front is a really cool trick, and makes you feel really smart if you can figure it out yourself.

I mean, Tetris is cool too. It was the first game I decided to program and I had fun doing it. It's just that a majority of my time programming it was spent on rotations. It's not that they are super hard or anything, but you're pretty much stuck either using linear algebra (and math just plain isn't fun for most people) or preprogramming every possibility. But it is a famous game that pretty much everyone has heard of, and it's really not that big of a deal overall, so it's still a good choice imo.
 

JeTmAn81

Member
Well, it wasn't a joke, and that's really annoying. I take suggestions.

There's good online courses and ressources, there's books I like for other "targets" (I enjoyed Dive into Python, but that's definitively not for anyone), but I'm at a loss when someone wants me to suggest a book for beginners.

It's just that a bunch of bad books don't become a bunch of good books just because you can't find good ones...



Since Python is now an nationwide official language for high-school studies, there's many new books appearing, but they're often not that good.

I mean...

Chapter on stacks

"We will implement stacks using lists

Pop is done by L.pop(0)
Push is done by L.insert(0, elem)" (sic)

Way to go... Let's have a push/pop that's O(n)!

Sometimes, you wonder where editors find their writers...

...I don't think I've ever seen a stack implemented that way. It's probably still O(1) if they've got a pointer to the first element, but then that's not even a stack is it? No stack should ever have the option to specify where you're popping or pushing. Is there not a built-in stack class in Python?
 

Eridani

Member
...I don't think I've ever seen a stack implemented that way. It's probably still O(1) if they've got a pointer to the first element, but then that's not even a stack is it? No stack should ever have the option to specify where you're popping or pushing. Is there not a built-in stack class in Python?

Well, since stack is an abstract data type, the implementation technically doesn't matter. As long as you define pop and push, you've got a stack. So if you say:
Code:
pop(l):
    l.pop(0)
push(l, e):
    l.insert(0, e)
That's a stack. I don't really see this as a super big problem though. It quickly teaches what a stack is in theory, and that's cool as an introduction. It is pretty baffling though, since a 5 second google search (or just using the default option of pop()) shows that using pop() on the last element together with append is a much better choice. Much simpler too. The fact that the author apparently couldn't even do that is pretty worrying.
 

Kansoku

Member
lol, today was a fun day in /r/rust. There was a chain of blog posts about marketing Rust and all that stuff

First there was Rust is more than safety, which got a bunch of responses, such as:

Rust is mostly safety
Safety is Rust's Fire Flower
(both of which lead to the author of the original piece to respond with Fire Mario, not Fire Flowers)
Rust in 2017
Rust is its community
Rust is Software's Salvation (this one is a little hyperbolic, as you can see...)
Rust is... an elephant
Fire Flowers and Marios: Marketing Rust (which is a response to the response to the responses of the original article)

which finally culminated in...
Rust is literally Haskel, and the subreddit changing it's CSS to that of the Haskel subreddit.

And now I'm laughing my ass of this whole thing :D
The articles are pretty good as well, worth a read.

EDIT: Two more:
Why Rust?
Rust is about productivity
 

Massa

Member
How you deal really depends on what kind of company it is and how long you are actually able to stay away from it. Best advice I can give is to actually relax and do things you enjoy on your free time and resist the urge to be a workaholic.

Definitely make sure you figure it out though because stress can cause some crazy issues which in my case was problems with my teeth.

Thank you.
 
Is it okay to kind of come in here and whine a bit?

I have the last couple of days been looking into programming languages on codeacademy (Python and Java).

Previously I had done the HTML and CSS course and enjoyed it a lot and even had some practical use of it in making some fancy looking emails and stuff, I know some might say these aren't "real" coding or whatever, and I'm not here to take that debate. I happened to enjoy it found it fun, creative and rewarding that I could see immediate results from every single change I did from the very beginning to end.

Now with Python and Java, I'm not that far into any of the courses really (reached some stuff about conditionals and workflow in both), but I'm feeling totally crushed by the abstraction, lack of practical application and immediate results. There are some other outer factors adding my mood hitting bottom, but right now it feels like I will never get any this at all.

I'm very much a do it myself person and I kind of do want to learn because of practical uses I can immagine for it, and I guess at a certain level it would feel rewarding to actually complete something, but all of that seem so far off and hopeless now.

I will have to admit that I had some tiny fun with string formatting and else if stuff since it seems to be the closets to something actually tangible, almost like a tiny text rpg going on, but instead of that being something that's built on the courses kinda just move on into new tiresome and abstract lessons in a vacuum where I again fail to see the use of what I'm doing and what practical applications it might hold.

All in all it is a very frustrating starting experience and I'm unsure if I'm interested in following up on the courses on codeacademy since it all just seems useless right now (and also since the math parts of boolean false/true stuff on the python course are absolutely off putting).

/rant

Now that I'm done whining out my frustrations, maybe you fellow gaffers have some recommendations for other sites or tutorials that will suit me a bit better?

At the moment I don't really care whether it's java or python or something else. I just want something that feels grounded, practical and has tangible results and progression that directly builds on what I have done previously instead of slinging me into a blank slate for every new step.

You should do Harvards CS50. It is still a bit abstract, as its an intro to computer science so you get to learn about algorithms and big O and pointers and memory and such fun things, but it has you do projects to make it more concrete and use the things you learn during each lecture. Like in week 1 you have to use C to print out the pyramid from Mario bros with a user defined height, in week 5 you are already building your own spelling checker in C, and even later in the course you're building websites with python.

Its a really good introduction, and the production value is amazing compared to every other MOOC out there. Also, it is a hard course as its aimed at Harvard students and because you have to do the work yourself. It doesnt hold your hand, but its also doable if you put in the work. You can do it in your own pace, so thats also nice.
 
I'm at a loss when someone wants me to suggest a book for beginners.

I'm not sure of the overall state of beginners Python books. I learned from a book called "The Practice of Computing Using Python" Amazon Link Here

They recently released the 3rd edition this year, I learned from the 2nd edition. It's also the main text we are using in college at the moment (I read it last year by myself).

I found it explained concepts well and in depth with a ton of code examples and exercises. It leaned at some of the topics from a slightly mathematics perspective but not in really deep way. Taught me a ton about Python.

Not sure how it compares to other books. There is also I suppose Head First Python which just released a new 2nd edition updated for Python 3. I liked Head First Java but no idea how good this book is.
 
Top Bottom