Computer programming thread
- mgil
- Shitpostmaster General
- Posts: 8494
- Joined: Wed Sep 13, 2017 5:46 pm
- Location: FlabLab©®
- Age: 49
Re: Computer programming thread
Java will likely persist for quite a while, but newer languages are so much easier to implement. Go/Golang looks very much like C++ as well, which is a huge benefit.
-
- Registered User
- Posts: 2138
- Joined: Fri Sep 29, 2017 7:00 am
- Age: 48
- mgil
- Shitpostmaster General
- Posts: 8494
- Joined: Wed Sep 13, 2017 5:46 pm
- Location: FlabLab©®
- Age: 49
Re: Computer programming thread
I'm just thinking that as those slowly migrate to JavaScript and web based code, that Java will fade...
- rjharris
- Registered User
- Posts: 835
- Joined: Thu Sep 21, 2017 5:23 am
- Location: Champaign, IL
- Age: 39
- Contact:
Re: Computer programming thread
i'm late in this thread, but if you're aiming to do C++ in a relatively short time, I would emphatically not start with C. one is technically a superset of the other, but they're different enough philosophically that i would just learn C++ first.
that said, i really think python is really the way to go. ime, resources for python are much more beginner friendly. spend like a year learning python, get really good w/ thinking about code, and some intro algorithms, some basic oop, and then you can go on to learn nuts and bolts of how to to things in C++ etc.
that said, i really think python is really the way to go. ime, resources for python are much more beginner friendly. spend like a year learning python, get really good w/ thinking about code, and some intro algorithms, some basic oop, and then you can go on to learn nuts and bolts of how to to things in C++ etc.
-
- Registered User
- Posts: 2138
- Joined: Fri Sep 29, 2017 7:00 am
- Age: 48
Re: Computer programming thread
Yes, but much of the backend resources that those web pages and JavaScript is working with are developed with Java.mgil wrote: ↑Tue Jan 21, 2020 8:12 amI'm just thinking that as those slowly migrate to JavaScript and web based code, that Java will fade...
Also, mobile development is also predominantly Java/Android. (Which _is_ related to game development)
-
- Registered User
- Posts: 101
- Joined: Fri Jan 03, 2020 11:46 am
- Age: 36
Re: Computer programming thread
I'm a game programmer by profession (on big AAA console games, going on ten years now). My thoughts: the early programming stuff is going to be boring as fuuuuck. When he starts self teaching C++ or whatever other language it's gonna feel like it's a million miles from what he wants to be doing. That's fine, he has to learn the fundamentals and he just has to bear with it for a while. If he wants something more immediately gratifying he can dabble with Unity (which uses C#). Unity has a bunch of beginner tutorials so he can probably get something simple up and running in a few weeks. In fact, it'd probably be an edifying process to set a goal to eg make a space ship that can fly around in Unity.JohnHelton wrote: ↑Fri Jan 17, 2020 11:13 am Maybe this has been covered (long thread, fairly technical), but I will just ask the question.
My son (15) wants to program video games (surprise). He will be taking AP computer science next year, but I know that won't get him very far towards his goal. He thinks he wants to start learning to program by starting with C++. I use to program in the '90s, so I have some experience. However, things have changed a bunch in the last 20 years. Any advice on where he should start? I was thinking Java would be a good place to start, but there are so many options now. I plan to learn (relearn) alongside him (as just one more hobby for myself). Given the short attention span of a teenage, I feel like whatever he learns should feel productive for him sooner rather than later. I don't want him to get bogged down and lose interest.
Any advice is appreciated.
As for what language to start with, IMO it doesn't matter a ton. C# is applicable to unity, which is a big plus for someone interested in games. C++ is particularly difficult, but it is what the overwhelming majority of 60 dollar PS4/xbox1 games are made with. Python is good for writing quick console programs and learning high level language concepts. It won't hurt if he dabbles in a bunch of languages!
- JohnHelton
- Registered User
- Posts: 4450
- Joined: Wed Apr 11, 2018 12:17 pm
- Location: Bozeman, MT
- Age: 51
- Contact:
Re: Computer programming thread
Thanks for the info, @kingsamj. I'm passing all this input on to him.
- Mattjd
- Registered User
- Posts: 860
- Joined: Mon Sep 18, 2017 8:52 pm
- Age: 31
Re: Computer programming thread
The new big hype is a language called Rust which is safer than C++ because it forces you to code in a way such that memory faults can't happen (or happen less). I've never used it because apparently its supposed to protect against iterating a pointer out of an array, and stuff like that.
-
- Registered User
- Posts: 826
- Joined: Thu Mar 01, 2018 3:44 am
- Age: 43
Re: Computer programming thread
I agree that C++ is properly hard, so much so that it would be an insane choice for a first programming language. Where I disagree slightly is that I don't dislike C as a first programming language. It's simple, close to the hardware (or an abstraction of 1980's hardware), it gets you used to thinking about the computer without several layers of abstract computer science getting in the way. But that recommendation must come tempered with a rather large health warning about how dissimilar C++ is to C, despite superficial similarities.rjharris wrote: ↑Tue Jan 21, 2020 8:21 am i'm late in this thread, but if you're aiming to do C++ in a relatively short time, I would emphatically not start with C. one is technically a superset of the other, but they're different enough philosophically that i would just learn C++ first.
that said, i really think python is really the way to go. ime, resources for python are much more beginner friendly. spend like a year learning python, get really good w/ thinking about code, and some intro algorithms, some basic oop, and then you can go on to learn nuts and bolts of how to to things in C++ etc.
Python is a good recommendation too. I think I'd rather come to python from C than vice versa, though.
- Mattjd
- Registered User
- Posts: 860
- Joined: Mon Sep 18, 2017 8:52 pm
- Age: 31
Re: Computer programming thread
Doing linear algebra type stuff in python can be ugly. The notation is fairly whack.
Do love me some Matlab, but its so god damn cumbersome when you have to do anything big, way too many variables to keep track of. Matlab has OOP now, or has for a while but its still very procedural in nature. If that makes sense? I've got friends who work at Mathworks and they claim to do that on purpose. If you learn the vectorization tricks, which now work with their string types, and how to use the anonymous functions with the @fun type functions then you can do some very dense, productive code. The strength in Matlab though isnt the language, its all the god damn toolboxes, and Simulink. Being able to model filters/controllers and then generate C/C++/HDL to your target platform is fucking sweet. One of my friends took a reinforcement learning class. They modeled a quadcopter in Simulink and trained a reinforcement learning algorithm with that model. They got a basic ass autonomous drone running with that algorithm, running it on an Nvidia Jetson.
Python is king for data science though. Dealing with huge amounts of tabular data with Pandas module is the fucking bee's knees. I had just learned this recently but apparently its all based on this math called Relational Algebra. Same stuff used for developing SQL and dataframes in R. Python also provides a plotting module called Bokeh. Its like matplotlib but on crack. Provides interactive plots that are on par with those provided in Matlab.
I haven't used Julia, but I have read quite a few algorithms that speak highly of it but compare it to the Matlab of many years ago, still immature in some areas.
- rjharris
- Registered User
- Posts: 835
- Joined: Thu Sep 21, 2017 5:23 am
- Location: Champaign, IL
- Age: 39
- Contact:
Re: Computer programming thread
I think we actually agree. I was more commenting on the path to C++ via C that was implicitly suggested earlier ITT than on the suitability of C as a first language. That said, I like python better as a first language.convergentsum wrote: ↑Wed Jan 22, 2020 5:42 am Where I disagree slightly is that I don't dislike C as a first programming language. It's simple, close to the hardware (or an abstraction of 1980's hardware), it gets you used to thinking about the computer without several layers of abstract computer science getting in the way. But that recommendation must come tempered with a rather large health warning about how dissimilar C++ is to C, despite superficial similarities.
Python is a good recommendation too. I think I'd rather come to python from C than vice versa, though.
- Mattjd
- Registered User
- Posts: 860
- Joined: Mon Sep 18, 2017 8:52 pm
- Age: 31
Re: Computer programming thread
Who implied to do that?rjharris wrote: ↑Wed Jan 22, 2020 9:31 amI think we actually agree. I was more commenting on the path to C++ via C that was implicitly suggested earlier ITT than on the suitability of C as a first language. That said, I like python better as a first language.convergentsum wrote: ↑Wed Jan 22, 2020 5:42 am Where I disagree slightly is that I don't dislike C as a first programming language. It's simple, close to the hardware (or an abstraction of 1980's hardware), it gets you used to thinking about the computer without several layers of abstract computer science getting in the way. But that recommendation must come tempered with a rather large health warning about how dissimilar C++ is to C, despite superficial similarities.
Python is a good recommendation too. I think I'd rather come to python from C than vice versa, though.
Other than python being easier to use, its also the easiest to get something cool going, which can be a great motivator.
- Root
- Grillmaster
- Posts: 1997
- Joined: Fri Sep 15, 2017 8:28 am
- Location: Western Upper Lower
- Age: 44
Re: Computer programming thread
I'm diving into Rust currently. Seems pretty awesome, but I'm just getting started...Mattjd wrote: ↑Wed Jan 22, 2020 5:31 amThe new big hype is a language called Rust which is safer than C++ because it forces you to code in a way such that memory faults can't happen (or happen less). I've never used it because apparently its supposed to protect against iterating a pointer out of an array, and stuff like that.
- Mattjd
- Registered User
- Posts: 860
- Joined: Mon Sep 18, 2017 8:52 pm
- Age: 31
Re: Computer programming thread
I know a guy from school, fwiw I consider him pretty intelligent, and he wont stfu about it. He likes programming stm32s with it. From what I read, the biggest pita is just getting used to the compiler smacking your hand all the time and changing your thought process on things that you would normally do in C++.Root wrote: ↑Fri Jan 24, 2020 1:22 pmI'm diving into Rust currently. Seems pretty awesome, but I'm just getting started...Mattjd wrote: ↑Wed Jan 22, 2020 5:31 amThe new big hype is a language called Rust which is safer than C++ because it forces you to code in a way such that memory faults can't happen (or happen less). I've never used it because but apparently its supposed to protect against iterating a pointer out of an array, and stuff like that.
- Root
- Grillmaster
- Posts: 1997
- Joined: Fri Sep 15, 2017 8:28 am
- Location: Western Upper Lower
- Age: 44
Re: Computer programming thread
I may need to talk to your friend.Mattjd wrote: ↑Sat Jan 25, 2020 9:13 amHe likes programming stm32s with it.Root wrote: ↑Fri Jan 24, 2020 1:22 pmI'm diving into Rust currently. Seems pretty awesome, but I'm just getting started...Mattjd wrote: ↑Wed Jan 22, 2020 5:31 amThe new big hype is a language called Rust which is safer than C++ because it forces you to code in a way such that memory faults can't happen (or happen less). I've never used it because but apparently its supposed to protect against iterating a pointer out of an array, and stuff like that.
- JohnHelton
- Registered User
- Posts: 4450
- Joined: Wed Apr 11, 2018 12:17 pm
- Location: Bozeman, MT
- Age: 51
- Contact:
Re: Computer programming thread
When you are teaching yourself to program (again), and you are a lifting nerd. This is python.
Code: Select all
one_rep_max = input("Enter your 1RM: ")
num_of_reps = input("Enter the desired rep count: ")
hnfm = input("Enter target HNFM: ")
one_rep_max = float(one_rep_max)
num_of_reps = int(num_of_reps)
hnfm = int(hnfm)
PLATE_SIZE = 2.5
# Determining number of reps, assuming RIR = num_of_reps + 1
# Using a formula derived from Wendler's 1RM formula
weight_on_bar = one_rep_max * 30 / (num_of_reps * 2 + 31)
weight_on_bar = PLATE_SIZE * round(weight_on_bar / PLATE_SIZE, 0)
# Determining number of sets given HNFM
percent_intensity = weight_on_bar / one_rep_max
hnfm_per_rep = 1 / (1 - percent_intensity) ** 2
num_of_sets = int(round(hnfm / hnfm_per_rep / num_of_reps, 0))
actual_hnfm = int(hnfm_per_rep * num_of_reps * num_of_sets)
print(f"You should lift {weight_on_bar} for {num_of_sets} sets")
print(f"of {num_of_reps} reps.")
print(f"The actual HNFM will be {actual_hnfm}.")
- hsilman
- ✓ Registered User
- Posts: 2842
- Joined: Fri Sep 15, 2017 8:31 am
- Age: 39
Re: Computer programming thread
Classes started this week.
Advanced algorithms, no idea because it's probably the worst professor I've ever had in my 13+ years of post secondary education. Dude was like Bill Burr as a teacher, rambling angry tangents. No idea what the class is going to be like yet.
Intro to Theoretical CS. Seems like it's going to be very difficult but very rewarding. Professor seems like a very good teacher.
Advanced algorithms, no idea because it's probably the worst professor I've ever had in my 13+ years of post secondary education. Dude was like Bill Burr as a teacher, rambling angry tangents. No idea what the class is going to be like yet.
Intro to Theoretical CS. Seems like it's going to be very difficult but very rewarding. Professor seems like a very good teacher.
- Mattjd
- Registered User
- Posts: 860
- Joined: Mon Sep 18, 2017 8:52 pm
- Age: 31
Re: Computer programming thread
I am taking a Digital Image Processing course and RF Electronics. RF starts today. Have had two lectures of DIP so far. DIP is completely project based, 1 lecture and 1 lab every week. Midterm is an image we will have to enhance/restore and then final is a project on topic of choice.hsilman wrote: ↑Tue Jan 28, 2020 4:34 pm Classes started this week.
Advanced algorithms, no idea because it's probably the worst professor I've ever had in my 13+ years of post secondary education. Dude was like Bill Burr as a teacher, rambling angry tangents. No idea what the class is going to be like yet.
Intro to Theoretical CS. Seems like it's going to be very difficult but very rewarding. Professor seems like a very good teacher.
DIP is Matlab based and is basically us re implementing built in functions from the Image Processing Toolbox. Seems like a cake walk so far, but I know a lot of Matlab vectorization trickery.
-
- Registered User
- Posts: 2138
- Joined: Fri Sep 29, 2017 7:00 am
- Age: 48
Re: Computer programming thread
For learning, yeah. But the entertainment value has to be worth the admission.
- hsilman
- ✓ Registered User
- Posts: 2842
- Joined: Fri Sep 15, 2017 8:31 am
- Age: 39
Re: Computer programming thread
That class sucked and I learned nothing. But he's an easy grader so I ended up taking another one(or two?) with him. Theoretical was very rewarding.
I passed my comprehensive exam, and I'm in my last class now(Networking). I'm assuming I'll pass this class, and I'll have my master's. Just had my first job interview.
Where's everyone else at? I think we all still post here!