Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "cpp"
Friend : Hey bro I made an awesome program which shows your future wife's name.
Me : Hey that sounds interesting, show me the source code bro !!
Friend shows the code :
using namespace std;
string first_name , last_name;
cout << "Enter your first name\n";
cin >> first_name ;
cout << "Enter your last name\n";
cin >> last_name ;
cout << "Your wife's name is " << "Mrs " << last_name << "\n";
Me : Dude you are gonna crack Google some day :P16
So this guy passed large objects as function arguments directly instead of referencing. What a jackass. So the program was slow as fuck AND taking up too much memory.
So yeah, I'm basically ranting about myself.2
I'm dreaming to send homework to my C++ programing lecturer full of strange #defines and make the code compilable, runnable and working well
He would feel the black side of cpp😈😈😈20
I have just landed my dream job. Coming from a background of java and python, I applied for a C++ heavy company... The interview process was centred on algorithms and I passed it. Now I get to learn the language I have always wanted to learn from pretty hardcore devs while I am getting paid. One of the best fucking days of the 21 years I have been alive for.3
Instagram coding pics are so fucking cringe worthy....like for real man. A picture of a simple cpp loop, or averyfuckingbasic Express hello world in some hipster filter with inspirational quotes and everyone looses their shit for it.
Instagram people are so easy.12
I've got a mini stroke today. My project ended and I got delegated elsewhere.
"It's going to be fine, it's c++, you will find yourself there"
Suspicious, it's a project everybody was staying out of as hard as they can. But hey, it's cool, how bad can it be? what can go wrong with that?
Reality was brutal, project that uses Boost C++ as framework and bjam as builder. Builds with a decent dose of luck, and only under special circumstances, only under one specific version of compiler. No docs, quartet of the code is in Fortran, just to use ancient lisp part which was second qarter. The most senior Dev around does not have idea how it all works. Also everything is inside one enormous try/catch block. Because of the reasons.
That's how people end up with severe alcoholism and meth addiction.8
I'M AN IDIOT.
I accidentally typed the wrong command when I was compiling my C++ code with GCC, and guess what?
My .cpp file is gone. The .exe is still there, but that's useless to me right now.
It wasn't an important code, just something I recently started on, but I can't believe I did something so ignorant.19
I knew nothing about programming then i came across this amazing chilled out teacher who taught me cpp literally through jokes and puns and here I am still learning the best thing I've came so far
P.S. Here is a meme to show what my mates think when i fix stuff up2
With time, I have come to the realisation that when a person says he knows C++. He's either a noob or god!3
I'm using C++ for machine learning purposes using TensorFlow and OpenCV (rip Python, you are too slow 😭)
What are you using C++ for? 😁19
C++ has become cockpit of Boeing 747
Too many controls? Yes.
Takes shitton of time to get ball rolling? Yes.
You need just bunch of them to get stuff done? Hell yes.
You still have to learn a lot of them if you plan to become professional? Yes.
You need to touch most of the fancy stuff only once in a while? Yes.
Many controls you wont be touching except once or twice in your whole career? Hell fucking yes.
You need those fancy controls when shit goes tits up? You better have them, or you are dead!
"Sooo, children of the village, what are we going to write front-end in?" - I said to my infant students.
"Typescript with ts-loader/awesometypescript loader for webpack" - simultaneously yelled the kids.
"Exactly! Brilliant! And now, what are we going to be writing back-end in?" - asked I then.
The kids yelled: "PHP 7.2 with Laravel, or Go with Gingonic and juliensmith/httprouter, or Typescript without loader, with express/koa"
Truly stunned with their excellence, I asked "Well, now you 100% ain't gonna get it right - what are we going to be writing a desktop application that doesn't require a lot of native functionality and preferably, cross-platform in?" And the kids didn't hesitate to yell happily "Typescript targeting Electron", which has only brought tear to my eye.
"A native ms windows app?" "WPF under C#"
"A native gtk app?" "Vala"
"A native KDE/XFCE app?" "Cpp/Qt"
"A native mac app?" "Swift3.2/4"
I was in tears, just thinking about what future these kids have, but suddenly I have noticed one of kids seemed puzzled. It was Pajeet, an indian guy, ugh, his mom was a bitch. I asked him "What is wrong, little acoustic?" "But I like Java, and I would like to make back-end with Tomcat!" he replied. "Ooooh :3" cutely I moaned, trying to reach the handle of the table locker "I've got something just for you". I pulled out a rope, with sewed-in spikes, covered in drool and piss, came up to Pajeet and tenderly put it around his neck, making a knot. Pajeet fell under the table, and I got fired.8
Friend of mine at college is struggling with his cpp class.
Have been helping this guy since forever with it, he is not a coder by any means nor does he display any sort of affinity or "talent" for it. But he does make up with intense dedication. Still he knows that he will not be pursuing a career in software engineering, this is just a class.
The thing is, he showed me a video of his class. The instructor is middle eastern with a thick accent. Accent so thick I need subtitles for this motherfucker.
He has learned more from me that he has at uni. And at my day job the interns say the same thing. I love teaching and far prefer it over working on projects.
This week we have a meeting with the head of the i.t dptmtn at school as nd I will try to pitch myself in as a faculty member by popular demand.
I would love to teach, i have experience in the field and learn a lot from going over shit as an instructor. I can make one go from wtf is JS used for to handling promises and writing Angular in days.
I really want to teach man.7
What I have learned by learning OpenGL for about 2 days.
1) C++ and its compilers are clunky as shit
2) There is a minimal amount of entry level docs
3) You need 5th grade math to do programming
4) Comment every single line to not get lost in OpenGL API
5) The include directory is not in the project but at /usr/local/include
6) Giorno's theme from Jojo's Bizzare Adventure is fucking awesome8
Wrote a cpp semester project where i had to develop school management system.
The code was spaghetti and horrible with frightening OOP implementation but it was beautifully written with comments and 🐫 Casing.
Submitted the program and examiner rejected it while saying that i had copied it from else where and i could never write a beauty code like that .
You dumb 💩! Don't you know other basis to reject a person's hard-work7
When I was in college I used to think deadlock is just a theory concept. First c++ project on my job and I already have one now. 🙃
Why is starting a C++ project so overly complicated and annoying?!
So many different compilers. So many ways to organize the files. So many inconsistencies between Linux and Windows. So many outdated/lacking tutorials. So many small problems.
Why is there almost no good C++ IDEs? Why is Visual Studio so bizarre? Why are the CMake official tutorials literally wrong? Why can't we have a standard way to share binaries? Why can't we have a standard way to structure project folders? Why is the linker so annoying to use?
Don't get me wrong, I quite like the language and I love how fast it is (one of the main reasons I decided to use it for my project, which is a game almost comparable to Factorio)... But why is simply starting to write code such a hassle?
I've been programming in Java for years and oh god I miss it so much. JARs are amazing. Packages are amazing. The JDK is amazing. Everything is standardized, even variable names.
I'm so tempted to make this game in Java...
But I can't. I would have a garbage collector in the way of its performance...12
I present to the world:
A c/cpp "compiler" that never compiles without errors.
Now.. I never said that the code was pretty, or documented, or made any sense, or worked properly. I just wanted to share this little project.
Feel free to add funny error messages to the "errors" list.12
The year is 2019.
C++ is still one of the most powerful programming languages around..............with no centralized package manager that is widely adopted by the community that allows one to sandbox libraries from conflicts with one another.
I ain't hating, just find this funny and I love cpp
Apt get/git submodules it is!!16
Seeing anything serious written in cpp with in line assembly, that level of witchcraft fascinates me2
So I've been doing some code jobs now and recently they pushed me to a new level.
This company worked with some silly management app made in cpp which they asked me to edit a little bit giving it another style and some additional functions.
Day 1: this code is a mess.
Day 2: this code is a mess.
Day 3: how does this code even compile.
Day 4: I no longer have faith in humanity.
Day 5: I found my first comment (Yay?).
Day 16: I'm done.
Day 19: I got paid.
If you're making a project in cpp just like that dev you do deserve a punch in the throat.
No documentation, no comments, no patterns, just some thick pasta of poorly written code, names like fCalcAllTaxFilesSizeMB....
This haunts me for real.2
An hour before my Mathematical Expression and Reasoning for Computer Science final...
Have reviewed all the material available but past exams are useless because new_prof == new_format.
This is not even a rant, I'm just scared because to get into the major I need an average between this and programming of 82. I fucked up in the second midterm and got a 50/100. Everything was so perfect (at least above 80) and now I need more than 70 in this final. I'm feel I can get more than 70 but I had the same feeling during the midterm I fucked up.25
"Write something that does something good, irrelevant what, in the next 30 mins"
Oh hell yeah
"In brainfuck. Maximum 35 characters."
I might be fucked up, but I have a tendency to gravitate towards the shit that everyone else dislikes for the sake of knowing if their bias against is actually because shit is truly fucked up or if shit is legit plain WRONG.
From all technologies that I have worked with professionally I can count:
Java(currently in the form of old JSP services for an "enterprise level application")
Java for Android development - i was the lead engineer for a mobile project
Swift with IOS dev, same gig as the above.
C++ for Android development in the form of OpenCV with Java as well.
Clojure for an ldap active directory application
Python for glue scripts
Classic ASP with JScript and VBScript
VB Net forms
C# For ASP.NET MVC
Bootstrap for multiple intranet frontends
Node+Express for a logistics warehouse management tool
Ruby on Rails freelancing small gigs
Php in all ways possible from complete standalone php apps to Laravel and just php+composer apps aaaaall the way to wordpress
I am currently in a bit of a (well-deserved) lull at work, both of my projects are finishing up/ finished, so tomorrow should be pretty light, as the latter half of today was.
And I have really gotten interested in the HTTP protocol. It's so interesting learning how it all works under the hood.
So I think I'm going to be researching/ messing around with creating a cpp project that essentially implements cURL from the ground up, creating sockets, reading from them, parsing the HTTP requests... all that. I don't expect to actually get it done, but it should be an immense learning experience. I have a clear goal: implement this function:
std::string get(const std::string&);
Once I'm able to just GET as simple as that, I know I have achieved my goal!3
I had a genuine respect for C++ developers back in 2001
Then this whole STL thing happened. Then C++11, C++14....C++17
Me now: Bitch do they even write code 🤣🤣11
My classmates are wining, because they suck at programming-tests but don't even try to learn it.
Big AF facepalm!7
Pushed code remotely and told a teammate to run it on the target hardware. He then told me he might of blown up $6000 worth of equipment. Then he says "Never mind everything works."
World record for biggest heart attack?1
devRant already replace SoundCloud as my orange app in the main screen...
To be fair, SoundCloud was just there to complete the rainbow.
Rant: this app told me that my rant would be safe if I closed the Post Rant window (since I can't post more than one rant per hour or something) but it didn't save my awesome tags! I feel betrayed.23
Turns out cpp isn't the terrifying monster it used to be! I must be doing something wrong, it's actually working.4
I can't take a (C++) project seriously if it is using Visual Studio's build system instead of autotools, CMake or even just a Makefile.8
So lets make a list of what i love
I propose a list of interesting readings. Not limited to developing.
Yes, I'm in need of something new to read...
I'll start in the comments, feel free to comment new readings or critique the ones proposed.29
“Lots of CS undergrad folks imagine their careers are going to be sort of a rockstar/ninja/superhero experience. ‘Just wait ’till the world can see what I can do!’. It has to be this way because, well, ‘I’m above average’, right? You expect long hours of designing and implementing complex algorithms (at least I did). Then you get your first job and WHAM! You get ‘schlonged’ with 20 years old code that appears to be the result of experimenting with hard drugs.”
—Krzysztof Szatan, “Why would you learn C++ in 2016?”, retrieved from http://itscompiling.eu/2016/03/...3
1. Learn android development
2. Spend more time coding than procastinating (its not my job)
3. Learn more cpp
4. Publish my first android app
5. Finish my current project2
So I'm doing some OpenGL stuff in C++, for debugging I've created a macro that basically injects my error check code after every OpenGL API call. Basically I don't want any of the code in release builds but I want it to be in debug. Also it needs to be usable inline and accept any GL function return type. From what I can tell I've satisfied all requirements by making the macro generate a generic lambda that returns the original function call result but also creates a stack object that uses the scope to force my error check after the return statement by using the destructor.
Basically I can do:
Etc where the GL call can be a function parameter or not.
So my question is, is the code shown in the picture the best way to achieve my goals while providing the behaviour im going for?13
Before I was unceremoniously laid off by a shit company in which they tried to blame shit on me I was working on a opencv implementation of a proprietary document scanner.
I finished the Android prototype and was working on the ios implementation. It was left unfinished in the ios version because I was building it in swift and obj c to compare code bases.
They launched a shit unfinished Android app of their product without the scanner (they could not add the scanner lels) and have not been able to do shit on the ios version.
I did not give them the Android prototype. There was no binding contract that specified that what I developed was theirs. There is no record of anything.
The scanner? Is still in my phone and I still have the built project in my mac.
Unless them cheap assholes decide to pay another engineer for the opencv implementation, their vbscript php non theory knowing shit lead will have to figure out the required mat obj c swift java cpp code needed to build it.
I was working on my OOD class project (code analyzer) while my gf was trying to watch greys anatomy...for some reason Netflix and watch series wasn't working and she asked me what do I do...
My spontaneous reply: have u tried github...😕
Her reply: what is that is it like a porn site4
*flashback to days of windows xp*
Just finished formatting and installing xp on friend's trash pc cuz the os was compromised due to a shitload of viruses. Notice that other partitions might still be infected and i don't have an antivirus on me.
"Big boi Ill be back in an hour, just whatever you do, don't open ANY drives no matter how urgent it is. Just Don't do it or i won't be able to help you"
Come back and VIOLA this worthless trash avocado opened a drive to play a game and d pc was infected. Again. Back to square one. It almost broke my heart. Almost.
I remember that day well. I was 15yo and hopeful. That day marks d start of my hatred toward tech incompetent people.
A N G E R Y
My classmates stink of incompetence. I'm not that smart in fact i consider myself to be a noob among devs but seeing ppl that are several order of magnitudes trashier than me breaks my heart and makes me soo Fkin
A N G E R Y
Hey you cunt of a skunk, WHY can't you even compile a fkin cpp file without an IDE what the fuck is wrong with you? What do u mean ur program isn't compiling? Well it literally says there syntax error on line 15 congrats u moron u fkin spelled else as esle. Why shud I waste my time on stupid Shitty ppl like u huh?
And waddup mr shithead.No. Not gonna help you partition ur drives and install a fkin linux just cuz ur too lazy to google it urself.
And if i refuse to help cuz im working on my shit then I AM D BAD GUY? Stop bitching about me u lazy bastards get ur lazy arse off and read the fkin book. Watch a tutorial or sm shit why the fuck can't u understand YOU LITERALLY PAY TO COME HERE AND YOU AREN'T EVEN TRYING TO LEARN THE BASICS GOOD LUCK GETTING A JOB YOU WORTHLESS CUNTS.
Now now all the poison is out i can finally focus on improving myself and stop giving a fuck about them. Its hard to be calm and cool when ur surrounded by ppl like this all day. Even harder when there is almost noone that you can look upto. All this time, there's only one thing I've learnt- in a place like dis, being an asshole is better dan being polite.3
I fucking HATE the Arduino environment right now.
First of all: you can't fucking put your project files in a sub folder to the main file. I can't write #include "src/motor.hpp" because it doesn't fucking know what that means.
Turns out you have to put all your header files in the fucking library folder common for all Arduino projects!
Secondly, you can't call your cpp headers hpp, they HAVE to be called h, or the Arduino environment throws a fit and begins whining about being unable to find the fucking files.
Not just that! You can't reference other Arduino libraries from within your library because the environment doesn't know what that means either.
To get around that you need to fucking include the library in your main file, AND THEN you can include it in the library file that uses it. After all, it should be the programmer's job to soon feed a so called IDE, right?
I'M SO FUCKING DONE WITH THIS SHIT! 😤
I'm ready to either program the Arduino directly with an AVR programmer or even port the entire project to the raspberry pi where I have a proper fucking Linux environment with a proper fucking directory structure so I can code proper fucking C++.
Hell I'm even fucking willing to spend all weekend porting all the code myself if necessary.
It's not reasonable that correct fucking C++ code is invalidated because I called the files something "wrong" and put them in the "wrong" directory.
"user friendly project board" my ass12
Saw a post in which some dude said that he lost his virginity to C++. Well, I got it the hard way - I actually lost mine to assembler.6
First programming-course at the new school.
I was pretty excited until it hit me.
This is an intro-course.
We need to use CPP, not C.
We need to use Windows.
We need to use a shitty IDE instead of editor and compiler.
Went from super excited, to fuck this shit, pretty fast22
C++ code written before current standards still complies and is just as maintainable, but every so often a new major change to the standard happens and I feel like all my code I wrote before last month or so now needs updated. "Range-based for" ALL THE THINGS. except I'm just retouching code and possibly adding bugs along the way.
Sometimes I just feel that my most mastered and beloved language suffers from a severe case of multiple personality disorder. As soon as I get to know it, it's suddenly somebody else.1
Wellp lately so much shit happened with parents and school that id like to (atleast see my options for) get(ting) a job in order to be independent.
What could work, knowing im a backender, coding in cpp, but open for other langs ?
I have no degree, but my github repos lol13
I believe it is really useful because all of the elements of discipline and perseverance that are required to be effective in the workforce will be tested in one way or another by a higher learning institution. Getting my degree made me little more tolerant of other people and the idea of working with others, it also exposed me to a lot of topics that I was otherwise uninterested and ended up loving. For example, prior to going into uni I was a firm believer that I could and was going to learn all regarding web dev by maaaaaself without the need of a school. I wasn't wrong. And most of you wouldn't be wrong. Buuuuuut what I didn't know is how interesting compiler design was, how systems level development was etc etc. School exposed me to many topics that would have taken me time to get to them otherwise and not just on CS, but on many other fields.
I honestly believe that deciding to NOT go to school and perpetuating the idea that school is not needed in the field of software development ultimately harms our field by making it look like a trade.
Pffft you don't need to pay Johnny his $50dllrs an hour rate! They don't need school to learn that shit! Anyone can do it give him 9.50 and call it a day!<------- that is shit i have heard before.
I also believe that it is funny that people tend to believe that the idea of self learning will put you above and beyond a graduate as if the notion of self learning was sort of a mutually exclusive deal. I mean, congrats on learning about if statements man! I had to spend time out of class self learning discrete math and relearning everything regarding calculus and literally every math topic under the sun(my CS degree was very math oriented) while simultaneously applying those concepts in mathematica, r, python ,Java and cpp as well as making sure our shit lil OS emulation(in C why thank you) worked! Oh and what's that? We have that for next week?
Mind you, I did this while I was already being employed as a web and mobile developer.
Which btw, make sure you don't go to a shit school. ;) it does help in regards to learning the goood shit.7
After ten years of working sh*t jobs I finally got the chance to study CompSci at a top university... All the kids look at me as if I've been programming for years, truth is I just study a lot because my scholarship requires me to get B+ or above.
I love pipes in R. Really wish more mainstream languages would adopt that *looking at you python, nodejs-tc39, rust, cpp*
Just something about doing
data %>% group_by(age) %>% summarize ( count= n() ) %>% print
As oppose to
print(summarize (group_by(data, age), count=n()) )19
I made a game out of boredom and I think it looks cute.
Full size: https://dl.dropboxusercontent.com/s...4
Be me, wanting to try out PyOpenGL.
Lets start by drawing a rectangle.
And now add some text?!
NOPE CANT RENDER FROM TTF OR SOME OTHER STUPID SHIT! YOU NEED TO CREATE A BITMAP FONT. WHICH IS THE MOST INEFFECTIVE BS IVE EVER SEEN.
K but there is surely a library for Python which enables the usage of text in OpenGL? Yes but its last support was 12 years ago.
FFS WHAT IS THIS GARBAGE?
At the end i found out cpp uses freetype to convert each character of a font to a bitmap with the according spacing.
THIS SHOULD BE WAY SIMPLER!5
WHERE IS THAT FUCKING SEMICOLON
WHY DO I HAVE AN EXTRA SEMICOLON
THERE'S AN EXTRA BRACKET ALSO WTF4
Why the heck would you allow (or need) nested block comments? Imo this is a major design flaw in the kotlin linter.
I always use /*... //*/ so I can remove the comment starter w/o having to remove the comment end, but kotlin just starts a second, nested comment there.
Java, C, Cpp, C#, JS,... Not one of these uses nested block comments. I think jetbrains was just lazy?
I mean, I know why such stuff happens. I also developed DSLs in MPS, but there sure are ways to go around such things..7
me making new dev friends
me: yeah that's cool what IDE are you using for C++?
guy: like an editor where I write the code?
guy: hold on, I don't know what it was called
> taps around his desktop
> guy shows word 2007
> I'm laughing a bit uncomfortably because I'm not sure whether he is serious or not
> guy opens up .cpp file in word
> so many questions
What are the chances that you get busted by your manager and 3 team leaders you personally know when you are going to a job interview?
We have poor men’s silicon valley near universities. Our company’s one office moves to another university. By the one in a million luck, interview takes at the same building where our next office of my current company will be. Managers and team leaders are there to inspect the new office. I enter the building, see them near elevator. One of them see me, with panic i wave my hand to him. There is a distance of ten meters, I hide behind a column. The team leader who sees me waving thinks I am with them to inspect new office. He asks others why am I not coming with them as I learn later. I can not pretend to play along and catch up with them, due to panic and time of interview is soon already. They get into elevator and finally I dont have to hide anymore 😂.
I got into interview and c++ exam with that physcology. Little did they knew that I just completed CPP PRIMER book. I both rock interview and exam but lets see if they will return with a job offer. What a rollercoaster of emotions.
Note: I am on mobile now so can not give more juicy details for now, fingers are tired.3
Just had a customer into my shop. A regular chap but we've never really spoken before. Turns out he's a system architect for British Aerospace Engineering, a huge company up here in the north of England. So we were chatting about what I study and what he does and I said, if I come out with a first or solid/high 2:1 in my software engineering degree, would that qualify me for an entry level at your place, and he said no. Hrs part of the interviewing panel, and he wouldn't even consider people my age (23 at time of qualification) without at least having another job in the field, and said most places would be the same. So let's say I decided to not go in for anything Web development and focused on C++, is there any sort of way you guys know of gaining experience in the field without first having another job? As mentioned I do freelance Web development, but do you think having a large Github portfolio and such would help me stand a chance? I know I'll need to take a lower tier job straight out of uni in the field, but as something to help speed the process along...6
So I decided to switch over to Ubuntu to get used to it and have fun with it along with trying to use Vim just as a side thing for experience (I'm still studying anyways and its semester break).
So I setup Linux in an external disk, booted Ubuntu, setup everything and then loaded a side project coded in C++ and Allegro into Ubuntu.
A few hours of googling and trying to setup Allegro to be properly installed and understanding how to use GCC with Allegro, it finally found the library and one of the cpp files gave an error that is not "cannot find allegro.h". That's great!
Added all the other additional cpp files into the command and added all the includes and there goes the terminal lit up with errors ;_; I'm so tempted to ditch everything and go back to Visual Studios7
Me: I've never been so long without exercising (since before this, my first winter), I should get in shape now that this God forsaken weather is finally reaching livable levels.
(some time later at the gym)
Also me: You've always been in good shape, why stop with just chest, let's do some arms and shoulders.
(48 hours later, Monday morning)
I had to turn my whole torso to look if any car was coming while walking to the library, moved like terminator because of the massive neck muscle pain, suffered through the pain of setting up all my study material to the realize (just now) I can't even fucking look down to my notebook... Can I be more stupid?1
I have a new personal project that I hope I'll share with you guys one day. It just came to me. A fog simulation for a window manager such that it has fog behind the transparent console while you code and the fog goes in front when the terminal is locked. How about it?2
Got my first job, 3rd year student from my country took me in to help making an app for a company in Texas... All the other guys are from 4th year or graduate school. Feeling nervous, let's hope I don't fuck up.2
So let's say you spent over a day trying to clone WebKit using git but it failed every single time. Because the WebKit repo is HUGE (at least 7GB of worthless bloated refs), your connection is unstable, and git doesn't resume.
Then you discover you can solve the issue by simply cloning it via SVN in your cmake script.
Then you hit build, and forget that you had `-j 8` set in your IDE settings.
Then your computer freezes when it tries to compile 8 of WebKit's "UnifiedSourceXXX.cpp" files at a time, and all your 16GB of RAM get obliterated.
What the fuck, universe?1
Fucking hell! Finally I found a good solution for a problem I never knew how to solve it in a beautiful way. For everybody interested: c++20 provides functionality for synchronously writing to a stream from multiple threads.
I hate programming tutorials for a complicated language like c++ that are dedicated to absolute beginners of programming. If you've never coded before, why are you trying to learn c++?5
I was going to work on a group project in C++ today. I thought to myself, how hard can it be to git clone it, open it in Visual Studio and run it. Boy was I wrong.
VS opened it fine, but when I tried to run it I got over 300 errors about missing headers, including windows.h. turns out I didn't have the correct version of Windows SDK installed. Installation (and download) took over 2 hours.
When it finally installed, the linker started complaining about headers not existing, even though I could see they did in fact exist. After 20 minutes of googling I finally got VS to recognize the headers as existing.
Then I wanted to start working on my part of the project. So I made new .h and .cpp files with namespaces and classes. Except I accidentally gave a variable a value in the header file, and apparently that's not allowed (because of course it's not). So I moved the assignment into the implementation file.
Apparently I can't do that either, because I have to tell what type that variable is, even though I already did it in the header. But when I do add the type in .cpp files it complains about a redefinition if this variable.
After almost 5 hours, I have wrote like 20 lines of code that doesn't even compile.
I give up. I'm going to bed. Maybe tommorow I'll manage to force VS to work2
Most of us have scary stories about professors that think that they know about what they are talking about when it comes to teaching comp sci subjects. Shit is so backwards in most parts of the world with teachers showing outdated or completely pointless tech.
A friend called me the other day asking for classic ASP help because it was being used in his web class. Another was asking me about flipping c cgi web scripting. Wtf are schools teaching? Having the drive to LEARN actuall useful topics that are relevant on the market is hard enough as it is...shouldn't schools help at least a little bit? I was lucky, we were thaught Java, Python, cpp, js, sql, html5, css3, php, ruby and we had classes for node (for those interested) and asp.net mvc. Those were RELEVANT and good classes and while some outdated tech was good the rest is just bullshit. Specially since most teachers have 0 market value as develpers...but hey!! Wtf do I know! Of course my word is shit against all them doctorate and master degrees.
Gimme a break. School can be great. But a lot of the leadership there is toxic af for our industry. And while I appreciate the effort in me being thaught modern languages (and thaught is a hard word since I already knew how to program way before going to school) i still remember a teacher taking points away from an assignment for not using switch statements in Python...despite my explaining that there was no such thing (you can go around it by using a lil technique using functions, its pretty cool..pero no mames)
Or what about the time I mentioned to a fellow student how he could use markup for having more control with his windows forms while the very same teacher contradicted me saying that shit was not possible. Or the guy at the school in which I work teaching intro to programming using fucking vba...fk man if you are going the BASIC route at least teach them b4j or something fuuuuck.
I had good teachers, but they were always cast asside by dptmnt heads as if they knew better. I just hate pendejo teachers I really do.
Chinguen a su madre, bola de babosos.11
Getting back to the cpp applet I started somewhat recently (Vanilla + Gentoo kernel version checker)...
Me: "debugging c plus plus code"
Dictation: "f***ing c++ code"
Well, it's not too far off.
Soo, i just downloaded unreal engine, let's connect it to clion and write / learn some cpp i guess5
After 8 hours of carefully installing Gentoo in my laptop I ended up with a... Completely unusable OS. Guess I'll try again tomorrow, apparently I didn't set up the kernel with the appropriate drivers.2
NodeJS C++ add-on is one of the best and worst thing ever to exist in NodeJS.
Writing a native add-on is such a fucking pain. It's full of inconsistent API. They are trying to fix that by the introduction of N-API. But that shit is still in experimental mode.
I want to use nan but I know that that is also going to be deprecated once the N-API gets stable.
OMG... I want to thank my mother for changing my diapers for many years, my brother for all the games he no longer plays, my wife for actually making money, my plant for the awesome smell, God for maybe doing something (I guess), thanks @dfox, @trogus, and each one of you guys that deemed my rants worthy of your ++.1
I learned C with a K&R copy a friend gave me years ago. Now at University we in CompSci get taught in Python the first year and Java next while the engineers start with C and (I'm guessing) move on to assembly later on.
This friend comes to me all worried because he has to submit the next day a working Reversi game for the console written in C. Turns out the game was divided among two labs and he failed to submit the first one.
The guy is smart but once a week or so, when we met to smoke a joint and relax with some other friends, he was always talking about how he would prefer something like law but that would be bad business back in Egypt.
Back to the game, I get completely into it. First hour checking all the instructions he was given, then reviewing the code he wrote and copied from Internet. We decide start from scratch since he doesn't really get what the code he copied do. It took us 10 hours only stopping to eat but we get all the specifications of both labs perfectly.
A week after that he comes to me: "my TA said your code is the ugliest shit he's ever seen but he gave me a perfect score because it passed all the tests". I'm getting better (the courses I'm taking help me a lot) but what really made me happy is that he solved the next lab by himself (Reversi wasn't the first time I helped him, only the first time he was absolutely lost). Now he actually gets excited about coding and even felt confident for his programming final.
No more talking about being a lawyer after those 10 hours, totally worth it.1
Going back to java after over a year of c and cpp.
System.out.println("yeah I still got this");
System.in......what was the console object called again1
My first cpp project takes 148GB ram. My mentor says it's okay till 50GB. God help me optimise this thing. I have started doubting everything. Int I = 0 also looks suspicious.11
If in emergency you have to hide porn..
Just put all in one folder and then compress
it with zip/rar and change the extension which none of your computer program can understand or just change it to .class or .cpp!5
>Working on code
>Shit works as intended first try, nice
>Goes to play strange bootleg Gameboy Color ROM sent by a friend
>ROM immediately fucking dies
>Pop emulator's debugger
we're executing from VRAM, stack's firmly embedded in ROM
>Add execution breakpoint to entrypoint of game, restart emulated system (because i'm actually using the legit bios i hacked so it allows null/corrupted games to run)
>Step through everything, everything goes well until all of a sudden we call a function and shit hits the goddamn fan
well we have the culprit
>step through subroutine
if <unused_byte_in_HRAM> != 0 then stackPointer+=32;tryAgain();else return
>Realize this is using a bootleg Memory Bank Controller with hard-backed encryption so none of the bytes executed or read as data are the right byte
>Find emulator that'll handle the jank MBC
>read code to try and figure out how it works
if checksumExtendedLogoBlob == some_number then set MBC_Bootleg1 else if checksumExtendedLogoBlob == some_other_number then set MBC_Bootleg2 else if...
>Spend 10 minutes finding the right bootleg MBC
>code shows 8 possible tables for real bit order based on some value in the cart header
>look for code that gets this value
>not in the header
>not in ANY header in this 1000+ file emulator
>not in any related cpp files???
>"Delivery failed: email doesn't exist"
fuck me i guess2
My professor for my Intro to Object Oriented Programming class decided that using .cpp files with xcode as a PowerPoint replacement was a fantastic idea.
Each file is a different 'slide', and half of them are empty main functions full of comments.
When the compile works fine but IDE doesn't link regardless of settings.
With this many errors I think it's telling me CPP is wrong4
Never realize how much you hate yourself until you dive into code on an old project.
Damn comments that mean nothing 😣2
been exploring the options for cross platform desktop app, and i found :
java : both awt and swing look ugly, i really like OOP of java, and the way projects are organized is easy to scale, but i need to deploy the jdk, and the speed on gui apps isn't that great
C# : (.net/ mono, i can't grasp F# and vb is stupid) looks native on windows, not so much alien on both linux/mac, and being a java cousin is a pro, i found the Eto library for mono even looks more native on *ix than winforms
wxwidgets: for C/C++ so far this looks like the best option for total native feel and performance, but man i fucking hate C code, and this looks a lot like C code, even with proper native Cpp support, maybe i should dive deeper in it
GTK+ : did any one mention C code ? because this mother fucker is plain C with macros all over the place, it made me realize why wx is promoted as Cpp friendly, i doubt I'll use this
tcl/tk : even tho ive never wrote a single line of tcl in my life, the tk lib is the default ui for both python and ruby on all supported platforms,
and i really love ruby, and Python is Usually a joy to work with
Qt : this by far looks like the best option, proper OOP in C++, bindings for python (ruby binds are outdated), almost native look and feel on supported platforms, and even has a gui builder in xml or json/js (qml) however i bet I'll use such a thing, the building tho depends on an external preprocessor "moc" and some wicked macros, also makes working with templates a fucking mess, and the heavy dependence on QObject inheritance makes integrating external libraries a bit more tiring, the signal slot system makes more sense in python than in C++, since it makes me confused about the flow of the code
lazarus: is a freepascal implementation that looks and feels like delphi, not so much for native look and feel, but good performance and easy language to handle
electron : this fat mofo is fat, it's the slowest of all options, if i want an html app, I'll just compile a stripped down webkit and deploy that
what do you think ? and did i miss something ?17
Fuck you c++...!!!
float a = 1.0/10.0;
float b = a*10.0;
a == b returns false
A beginner of c++ here
Wrote about a 1000 lines code (spread across multiple files, m not dumb)
Passed 90% of cases
Took one and a half days to figure out what's wrong
Turns out c++ doesn't give accurate (as perceived by a human who thinks in decimal) results when comparing equality of 2 floats with ==
Shouldn't that be the first thing to be taught in schools?24
It really sucks when you realize that you're gonna end up despising a programming language just from having an extremely shitty first experience with it.
About ten weeks ago I was forced to, despite that I was SUPPOSED to be able to choose the language myself, to learn C++ for this course when having literally not a single fucking bit of experience with it whatsoever. And that's pretty soon after already having a beyond shitty experience with the very same school AND the same teacher. (The school I study at "rent" courses from other schools, this is one of them.)
I have the final exam on Monday and I'm allowed to have a book on C++ with me to use as reference, as (I'm pretty sure) I won't have internet access on the computer I'll be doing the test on. I ordered a book with express shipping to be here during this week, Friday at the latest. Never arrived. Called customer service at the book store and apparently it was supposed to have shipped yesterday but hadn't and they didn't know why (fucking awesome girl at the customer service btw, 11/10 quality service). So we cancelled the order, sure, we get the money back, but I still won't have a reference for a language I barely know at all. (No need to mention libraries, did that, dead end.)
Oh, and about that school and that earlier experience I spoke of, because if their inability to do their motherfucking jobs, earlier this year I ended up struggling with money for a couple of months. I really want to fucking strangle these assholes and have them pay my fucking bills to cover the shit that THEY caused.
TLDR; I'm gonna end up hating C++ because of shitty fucking teachers at an even shittier school.6
I like rants that are thought provoking and push a message forward regardless of whether they may sting a little, so for my first post on here I'd like to hit at home with many of you.
How do you do java style oop with classes and inheritance and all that in c++?
Do I really have to make a header and a source file for each class?
And while we are on it: are there any sources of "famous" games written in cpp?8
I wrote the todo app some time ago. The code is not beautiful, but the application works perfectly for me. I hope that someone will like it. Enjoy!
Being hired as an independent contractor but working 40hours in the office 5 days a week and earning no other income but not getting cpp or ei deducted to CRA (this is very illegal for the employer). Very sketchy.
I'm going to make a template project for Cpp. And one of my questions is how to use Travis ci to test things with clang 6, on every platform. I was thinking about using a custom docker, but I didn't find a project using this. Is there a problem with it?5
Any people using Julia here for something real. Like analysis or building applications? Is it worth learning or should I stick to python and cpp ?3
Every time I check my old codes i start insulting my self..... How the fuck was i that stupid..... Still Stupid tho but i m progressing :D
I m learning to code by myself without any instructor :').... I wanna use unreal engine but i forgot how to code with cpp since i m only using C# now.. made winform apps and installing xamarin to learn about cross platform devloppment :)
Guys does any of you know good first c++ project. I have a lot of experience with java and python so I am not new to programming, but I want to get proficient in C++ because I am soon starting a job which all lower level programming.7
We have a (huge) project being converted from cpp to cs. This is done by another company.
We wanted them to also create unit tests for the cs version and they recommended MbUnit and Gallio.
I know a few libraries but didn't know MbUnit. All fine, I learn quick. Also MbUnit works like a charm
But then... I recently switched to VS2015 and somehow I couldn't get my unit tests to work. Turns out it doesn't support the compiler from VS2015. Also MbUnit stopped in 2013 T_T
Guess I have to stick with VS2012 for this project then.
Great start of 2017
Nothing bad to the guys in Belarus, though! They deliver great work!
If you read this, keep up the good work!
this moment when you forget to save a file and compile it with the same fucking errors...
Over and over and over again ...1
It really sucks that there isn't a de facto package/dependency manager for c++. Conan, cppan, hunter, cget, lots of projects trying to fill this gap. Yet, none seems to be mature enough -.-
I am a chinese dev with 5-6 years experience, working on c/cpp/golang for backend server and PHP for web.
But I still feel hard to learn JAVA and JAVA web framework. You know it just has too many bultshit too learn, which is meanless to me.
Do you no-chinese guys also think so?2
I like the settings on my phone as dark as the dungeons with Geralt and a torch or the awesomely dumb flashlight from Doom 3.12
I am new to c and cpp.
I used to exploit my college's competitive programming platform cus it had a bad architecture and almost no auth checks.
For every ajax request, they weren't sending auth tokens or any form of identification and ran all the programs without any logs and on the main thread and as root.. wtf, right?
But recently they've changed something to the site and I cannot run bash commands using system() call.
Is there any other way to execute bash commands using c and cpp.
I already configured a miner in their server but then they re-deployed it cos someone forked bomb the shit out of it.
I'm a noob in c and cpp btw!3
I would like to work with someone on an simple open source project, to test git. Is anyone interested?10
So I get an internship and I am obviously very happy about it.
First day at work and I get a brief idea of what my project is and it was related to machine learning with tensorflow which I have experience with.
Come tensorflow lite and NN api, my job is now to convert tensorflow model into tfLite and use NN api whichpart of NDK and I have 0 clue about it.
So I obviously go to documentation and read up about it. Goes to Google sample to checkout NNAPI example and I freak out looking at the no of files and the code cuz. Wtf are these JAVA CPP WRAPPER AND NATIVE CODE .HOW DO I EVEN START WRITING CODE FOR IT. WHERE DO I BEGIN. HOW DO I USE NDK WITH THIS. THERE ARE NO OTHER EXAMPLES ON THIS REEEEEEEE
Legit feel like quitting already2
There are 10 types of people in this world.
Those who understand ternary, those who don't and those who thought this was going to be a binary joke.1
Back in 2004-2005 when I was 2-3 years old, (I guess that, from this statement, the fact that I'm 15 rn can be inferred), I would sit on my dad's dinosaur computer. I don't remember brands and stuff, just Windows XP, Dial-up internet and the heap of CD-ROMs I had my parents buy me. They had all kinds of games, software, etc. It was a time when sharing that kind of stuff over the internet was, to say the least, impractical. It kind of makes me feel older than I am, looking at the cases full of those CDs, remnants of a past era. But what I consider my first actual exposure was in 2007, when I got my first laptop (netbook) and started diving in, exploring. It was the computer through which I learnt programming (My first lang was cpp), and the one that got me interested to dive deeper into the matter.
Ryan Dahl working on Deno is one of the current interesting projects that I have been following.
Initially, the dude was trying to use Golang and is currently migrating to cpp and rust since Golang is a gc language. Nothing wrong with that really. I am just excited to see what this man comes up, and Typescript as the main language? Fuck yeah.
This shit js gonna be bomb af. Happy to see him talk to openly about his flaws when building Node, which was still a massive success and a true game changer for a lot of people(me included) and I believe that Deno will repeat this. It already has 24k stars on Github and tracking the repo has become very interesting! I just wish i had the cpp/rust knowledge needed to help out with it.3
I guess I am not the only one who do not know why hes/her code runs. Today I was preparing a private API for our project and a part of it was not working for (IMHO) no reason. I was really upset, because I already put more then an hour work in a 10 minute task.
It was 9:30 PM, I came like 12 hours ago, so I knew I can do only one thing to erase my mind for a second: Clean my keyboard. I tried to be really precise and everything, because my finger can be really greasy now or then.
After a good 10 minutes I looked at my screen and I realised, that I managed to forget to remove the keyboard's cable, so my screen looked like someone tried to escape from Vim.
But! During the cleaning I also runned the code again somehow and it fucking worked. I am sitting here, cannot believe what I see. I see no changes whatsoever, so this might be like a friday gift from the universe.
Now, I can finally work on my own project...4
Just enrolled myself in Andrew Ng's Machine Learning course at Coursera for the summer, is it a good place to start? Any recommendations?
So I was wondering if any of you know if any good ways to inject additional functionality into a function in CPP. My use case is injecting a counter into an OpenGL draw function to see how many times per frame it's called. I know I can do this using assembly Inca more hacky manner as you might do for cheats in games(code caves), but I'm more interested in adding is for debugging/statistics for the game engine I'm working on. Basically im looking for a portable stable way of doing it that when I compile as a debug build, the code gets added to various functions, and when I compile under release, it doesn't.
drawCount++; //some debug stuff
glDraw(); //call the real one internally
I should mention with code caves you can do this by saving the original address of the function, patching the vTable to point to your new function that has the same parameters etc, then all calls to that function are redirected to yours instead and then you simply call the original function with the address of the function you originally saved. That said, I'm not sure how to access vTable, etc the "normal" way...2
Not only can I not download the attachments in bulk from my Outlook account, but the download button opens a new f*cking tab where I have to click download again after it fully loads the whole page. I'd gladly use this shit software if for every attached file I download a wrench would tighten on the genitals of the idiot that design it.4
So today I tried to code in c++ by separating class code into header and cpp file which I had not done before. Compiler was throwing error while compiling, "undefined reference to std::cout". Took me nearly an hour to figure out I was using gcc instead of g++.6
Do you ever get those moments if you wonder if you're in the right field? I'm not talking imposter syndrome or anything, just plain, you can't do it.
I've been staring at this cpp function for over an hour now, and I still can't decide where is the right place to return it. This is like every single day while studying cpp, and it's seriously beginning to dishearten me. I know it's just one of those things that'll come with time, but it's been nearly two years now and I still can't get it...6
Is there a simple CPP equivalent to a tree node in Java that has a parent and a arraylist of children? Or will I have to write out a 500+ line class to get the same functionality? 🤔12
Started at 14 trying to learn cpp to hack networks. I failed miserably. Real enlightening came with python.
I am going to start a big project (6-10 weeks) in my computer science class and had an idea to create an application that allows the user to share their mouse and keyboard over several computers regardless of OS. I plan to do the project in C++ but have no experience creating applications with C++. Firstly, is this project possible in. NET Core? If not, could you point me to resources or give me some tips that would help me in my project. Thanks.7
Fuck XCode. Worst IDE ever. Forgot to declare namespace for function in cpp file and it can't even underline it. And in addition to that, the slowest IDE!!!3
Lua handles arrays and maps/dictionaries essentially the same way. Makes for a pain when binding to cpp. Shame in an otherwise awesome embedded lang
VS2015 big cpp - project...
Scroll in file, decide where you wanna write code. Set caret (70s delay).
Ctrl+tab to check previous file for name of something (120s delay)
ctrl+tab to return to file (120s delay)
le me = Jsjsjdhdhxhxuxbfvfvefbd!!!!!
FU Microsoft :(2
Any c++ Gods able to offer a bit of help? I can't ask on stack for risk of a lecturer finding out but I really need help...7
I am doing a small application using C++ as a side project to learn C++ Developement. It would be better if i have a small UI . Will ncurses be okay ? Does it have any utility now ? Is there a better way ? Please keep in mind i am a beginner in terms of application developement..1
Calling C++ programmers, or probably any other language, is it bad practice for me to name a string "open_first_file" or should I camelCase it instead?12
I want to make a project
student analysis system
It works as
Student will signin in the site and upload their academic detail including roll no. marks of all the semesters, and other academic details then It will give them analysis of their academic performance like what is his rank in his class, in the department, and in the whole College. It will also show that in which subject he was week, in which subjects in upcoming semester he have to work to secure good percentage and a graph of his performance till now and change in graph if he follow according to us. It will also show the placement probability.
Now my question is which tech stacks should I use to make all this?
I know HTML CSS JS JAVA CPP and a bit of REACT. Js EXPRESS. JS MYSQL.
I am ready to work with other tech stack also.8
Has anyone used the meson build system for CPP? It's so beautiful. Finally, something to help us not kill ourselves during compilation.1
Getting used to C++.... Jesus those syntaxes.... you can write it so or so or this way... also this way.... did i mentioned this?!1
What is ploymorphism??? Im new to oop, and wanna learn more abt it. Preferably in examples from pascal or cpp.15
Couldn't they come up with a shorter name than reinterpret_cast? It makes lines of code so much longer if you have multiple casts in one line. 😥1
The frustration is real when you have an assignment in a programming course that you immediately know the solution to and could bang out in less than two minutes with Python, but you're instead *forced* to use C++ which you only started learning two weeks ago... :I2
First, a little bit of background info: I'm currently studying a programming course (Where I was *supposed* to get to choose language myself, but was forced to do it all in C++ which I had no prior knowledge of, but that's a rant post of its own.) and the final exam is coming up. I'm allowed to bring with me a book on C++ for this, so my question was if there are any good recommendations?
Primarily I'd prefer something that is as close to a physical copy of documentation stuff as possible, since that's what I'm going to need the most.
The books I've been looking at so far (and that look the most promising) are "The C++ Standard Library" by Nicolai M. Josuttis (ISBN: 978-0321623218) and "The C++ Programming Language" by Bjarne Stroustrup (ISBN: 978-0321958327). Thoughts and/or opinions? :/9
I remember codeblocks with pain the .h and .cpp, the pointers sometimes get the memory address that crash the program and program with opengl on codeblocks is the dead1
So my programming teacher knows his shit, but is pretty bad at explaining it.
I can already see some of the other students, especially the ones without prior programming-experience, flunking this class.
Today spent most of the class talking about 2-complement and the functions in math.h.
I think we didn't even learn about reusing code with functions, or structs.
I use some of my time, helping the other students getting through this somehow.3
Any devrant or friendly programming telegram group i may join?
Currently learning cpp and would like some supports..
For me it's going to be:
Learn cpp (for my education)
Make a game (to train cpp)
Try to find a project idea generator or build one
Hey fellow c++ devs, i have a question. I am currently working for a company that has a system with more than 300 000 thousand lines of maintained code and it is written in C++03. A lot of it utilises boost and custom performance work arounds and migration is currently out of the question, but I would really love to see some Cpp11 sugar in the code-base. I know there might not be too much business value to this potential endevour, but what do you think?1