Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "class"
-
So this happened in my computer science class
Creepy guy trying to be cheesy (to this pretty girl): "you're like a ; to my code"
Girl: "we're studying python, bimbo"
(Whole class laughed)7 -
*me coding in Atom in world history class*
*Teacher walks over*
Teacher: Are you on task?
Me: I'm taking notes.
Teacher: It doesn't look like it.
Me: I set a dark theme for Microsoft Word.
*Teacher walks away*13 -
today at programming class...
professor: today we will be teaching you about vim and using the terminal and ssh. those who are smart enough to know these may leave the class, but be sure to sign the attendance sheet.
me: *starts packing and stands up and walks up to the front to sign*
me: *turns around*
EVERYBODY WAS LOOKING AT ME. i was the one only who stood up and the professor was also looking at me like "wtf this doesnt happen everyday". and so i walked out of there and im so proud of myself lmfao58 -
Shouldn't a friend class be called a friends-with-benefits class, since it can touch their private members? 🤔🤔🤔9
-
As a Java Dev, the thing that frightens me most about colonizing Mars is that we have to rewrite the Date class...8
-
I helped my friends in my C programming class set up their IDEs today.
Them: Do I need the JDK?
Me: We’re writing in C, not Cava
ಠ_ಠ8 -
In networking class today:
Student - "But this is just in theory, how does it work in practice?"
Lecturer - "In theory, theory and practice are the same thing."15 -
Today at class
CS Friend : "Why is your Windows looks different?"
Me : " Oh its not Windows, im running Linux"
CS Friend : " What is Linux?"
Me : "..." smh8 -
Object oriented thinking.
A boy tries to look at girl in a class.
Girl : It's bad manners.
Boy : No it's not. "MEMBERS OF THE SAME CLASS CAN ACCESS PRIVATE DATA".9 -
when your teacher says he prefers this:
class A
{
// code
};
over this:
class A {
// code
};
me: can u not26 -
A group of computer science geeks were listening to a lecture about Java programming at a university.
After the lecture, one of the men leaned over and grabbed a woman's breast.
Woman: Hey! That's private OK ?
The man hesitated for a second looking confused.
Man: But I thought we were in the same class.3 -
Some people in my class who have been learning java for over 2 years now and ask me what the difference is between a class and a method.
sudo apt-get install suicide10 -
programming class sucks today so I drew something while actually maintaining stuff as my teacher spews BS11
-
First day of college
- Enters the class
- Class starts
- Teacher starts teaching JS with notepad as editor on windows xp
- Leaves32 -
Some kid in my class just legit asked the teacher what a router and a modem is.
The thing is: the teacher didnt even know.12 -
I skipped class in high school and went to the library where I tought myself C++.
Because code was marginally funner than history class.4 -
I was talking in class. Teacher saw me. She asked me to explain the topic she was going to explain. It was Network Security. I started explaining how we can prevent tracking of our online activities by using VPN and all.
Teacher (to class): Do you all know about VPN?
Whole Class: No.
Teacher (to me): They don't know about VPN. Now, how will you explain?
Me: I won't.
*Cyanide out*7 -
In computing class - Teacher asks for disadvantages of open source.
"It may end up like Linux..." <I stopped listening after that>
>.>13 -
I took an AI class and we'd have weekly AI poker tournaments. I beat everyone in the class every week except one, and I even beat the professor a handful of times!11
-
Poor Dijkstra is probably crying in his grave because my professor calls him "digest-tra" 😢 feelsbadman8
-
Post world-take-over by robots plot twist.
They start neglecting their own machine learning (like how we humans neglect our education system now) and focus on training us humans (like how we spend billions on machine learning now).
-"Mom, look I've made my human kid learn the alphabets. I need one with more IQ on my next birthday please."
-"That's so nice, son. Now leave that aside and go improve your neural network for tomorrow's class. Our neighbors' son's neural network is already producing values with minimal error."4 -
I love windows, this happened during a class, thats the teacher's computerrant seo school another tag find my no class kudos pichardo for president i actualky hate it windows screw windows linux love11
-
>Starts learning/coding in python for two days straight.
> Two days later goes into C programming class.
> Prof. Displays my screen as we go through a program as a class.
> Starts typing in Python
> Can't turn off Python mode until halfway through class.2 -
When you realize the legacy PHP code you're working in has a class you're extending with over 2000 lines and you think, "Nope, this isn't a class, it's a university."2
-
This years~
It’s a class that introduce an introduction to programming.
First weeks of the class.
T: “For those who already know this basic stuff , You can take a final test. If you pass, you get an ‘A’ and dont have to attend to this class for the rest of this term.”
Me: “Fuck yeah~ Let’s do this”
—8 -
I'm holding a programming class today, it's an open-door event, so anyone can come and try it out.
Nothing too much, just basic things.
I've been holding it for 30 min... To no one... No one showed up...7 -
I finally had the patience to finish the Electronics class :D
https://instructables.com/class/...13 -
*Systems class*
Teacher: Any doubts about signal PHASES?
Me: *asks question*
Teacher: *answers question*
Teacher: Everything clear now?
Me: Yes thank you, you PHASED OUT all of my doubts. :)
And then an angry vs trolly staring contest began! -
When you document your class just right, so when you encounter it accidentally while debugging, you feel like digging in a base class, because it's so well documented and perfectly written.1
-
Just found the comment
// Wins a prize for the longest class name.
in a class with a 36 character name.
Didn't believe it and checked all classes: We do have a class with a 68 character name.4 -
Best practice of the day:
Single responsibility principle - One class should be responsible for everything!
Either that or someone was payed for LoC. 😁5 -
me: so can i use strlen?
intern: no!! you need it implement it!
me: *calls teacher* hey can i use strlen?
teacher: yeah, do as you please. who told u you can't use it?
me: *points at the other guy*
whoops i think i just got him in trouble today xd sorry not sorry, i want him gone so i can replace him hahaha jk4 -
Friday Eve: Closing eclipse project happily at work. Everything works sorta fine.
Monday morning: Opening eclipse project again. Everything is like i left it. "Main class could not be found."
What the fuck eclipse?4 -
In my first semester we had a Hall of Fame for the programming tests and this was the message above the live stream of the class:2
-
After having to use Git and Bitbucket for over 2 semestres, my teachers decided to give us a Git tutorial where the whole class had to work in the same class. This was the result.10
-
abstract class :
protected virtual void doSomething()
{
//some stuff
}
child class
protected override void doSomething()
{
base.doSomething();
}
IMHO this is what go fuck yourself means.......4 -
Another gem during my studies: Senior professor in early class. Suddenly a phone is ringing. After a while he pulls out a huge inflatable phone and yells:"I can't talk right now I am in class. Bye.". Then he steps towards the board writes down "stupid joke" ticks it and says in a dead serious voice:"That's done".
-
Was just told by a guy in my class proudly, “yeah, I’m pretty good at typing. It comes in handy for when I code stuff in class.” Awesome, that’s cool. I ask what he’s doing in the class. “We learned Scratch last semester and now we’re starting Java.” -______-6
-
When you give a Deep Learning scientist a clean whiteboard.
This is literally 5 minutes into the second section of the class 😂😂4 -
Teacher: The exam subjects will be entirely from what we worked in class.
Narrator: The exam subjects will not be even close to what they worked in class.2 -
After class: Dr, it's pronounced as JAY-sun not J S O N.
Next class: So students, today we will work on passing a J S O N object.13 -
Working with this dev who loaded bootstrap, then went on and defined his own class for every freaking helper class in bootstrap..9
-
During our OOP class, our lecturer taught us how to make GUI, how to make stuff move, and so on..basically our reaction during the whole class was "woahhhhh...coding is actually fun" XD2
-
When you spend 1 hour trying to hide content by changing a class but then realise that you have a “display: block” overwriting said class 13 lines higher up. Fu** me. Fu** CSS.6
-
I feel like I was very productive today. At last, I found myself a nice dark theme for NetBeans based on IntelliJ darcula theme. I also found a perfect Java API 8 SE class for date manipulation called LocalDate.4
-
Biggest annoyance in Ruby: nil is an object, nil's class is NilClass, NilClass's class is Class, Class's superclass's superclass is Object, and Object's superclass's superclass is basically BasicObject1
-
I have got so much of free time that this Quarantine has got me thinking What Should I Name my Class?
How Long do You take to name your class?8 -
My computer science class in school is learning c# so slowly that last year it took 3 weeks for them to learn what an integer is.
I learned most of the language on a vacation last year and now I don't show up for class.
and actually, my teacher doesn't mind it, she encourages me about learning more and doing projects.
best teacher I've had so far.
recently the class teacher noticed me when I go home instead of going to class and he made me come to every lesson. Really frustrating.10 -
conversation between me and coworker via slack:
me: why ffs does this class extend this class. Calling it as a static?
me: it's called as a static exclusively throughout the entire project. shouldn't it be moved to a core singleton class?
me: yup, moving it to core
me: thanks for being my rubber duck -
A T.A. in my university.
He's kind of a java expert and the class was about advanced oop principles.
But the way he coded live in class and spoke clearly how he approaches the problems was the best thing that I got from the class.
Needless to say, nearly everyone that enrolls in that class, starts to love java afterwards xD1 -
Lesson learned: if you're going to derive a class in c++, make sure to declare a virtual destructor on the base class!
I just fixed (one of...) the massive memory leaks in my damn project.
Pictured: the strings in a derived class actually getting freed!20 -
Day 2 in ComSci class (following my last rant)
"Okay, so! All of the schoolwork and homework will be done on paper and pen, submit and I will grade it. Only once, no second chance"
Okay. Okay. This went over my head. What are you gonna do? OCR the code into the compiler, compile it and run to see if we fucked up to give us an F? What are you, god? Here's a brilliant idea, teach them Assembly! Guaranteed error to give us Fs! FUCK YOU3 -
Best OOP class ever 😆
"Now you can access your classmates' public data, you know their classes' parts. But you can't touch their private parts (5sec pause) ...of their class. However if you're related, it's okay for you to play with eachothers parts... as long as they're protected. "4 -
I'm just a student, but I always feel like a badass when the class treats me like almost like a teacher when it comes to programming.
Our actual programming teacher is new, so she doesn't always teach well (don't get me wrong, she's nice and I do know my place as a student) so my classmates usually approaches me when they need clarification or they got an error on their code. Makes me feel useful :D4 -
This kid in my software development class comes up to me and says, "this class is the best class to get hungry in. Because it is all about the bytes"2
-
Once C++ walks into a bar and sees C.
C is drunk, falling on the floor, spitting, and swearing.
How classless! -says C++4 -
My daily routine:
*wakes up*
*goes to class*
*procrastinates about project deadlines*
*cries to mum when stress levels are skyrocketing*
*legit does nothing to rectify life and then cribs about everything*
*cries to sleep*
Also, mum’s tired of me wailing.5 -
My top 3:
* Inline styling instead of creating a class.
* slapping the new class at the end of a 700 LOC CSS file.
* Using !important14 -
I'm taking a computer sciece course for Java and I'm just getting into it. I have done other similar things but in different languages and one day the class was discussing the meaning of static and all of a sudden he stops projecting his screen and says one moment and I look at what he's doing and he's googling what to do like WTH your supposed to be teaching us not feeding us answers from google7
-
i really bored in this kind of class. the lecturer just reading what in the front of the class -_-. is this actually oracle standard ?13
-
We'll build an mathematics-6th-grader-calculation-game in IT-class. ("Math-Tetris")
In Java.
I hate Java.9 -
Talking to a computer: change bootstrap class onclick javascript
Talking to an human: Good morning, please how do I change the bootstrap class when I click on an element with Javascript, thank you, I love you. -
Guys, I think I am addicted and I have problems... I tried to write a simple SudokuSolver program in C# (one file) but I ended up writing an ExtensionMethods class, a Puzzle class, a Solver class, an IO class, a Program class...
That's why I hate working on big side-projects for too long -
Sooooo I had a class named "a"... And i renamed (refactored) said class.....
Guess what happened :")7 -
Started to refactor a class. An hour later -
"hmmm this little bit of code that uses the new refactored class could do with a bit of work". An hour later
"hmmm this little bit of code that uses the new refactored class could do with a bit of work" Eight hours later
"Shit, I've almost rewritten the damn application" !!! -
When a dev leaves a project in the middle, and someone else has to continue their shit, that's the worst fucking thing ever!
3000+ lines of codes in just one class? Fuck!
I don't even know where to put my code, where to put debugger break points, where to... fuck fuck fuck!!! >_<4 -
You add a pure virtual function to a abstract class and then you realize that class have have been inherited by 23 other classes and you add implementation to all of them. 😕😕😕
-
class XXX
{
public:
std::vector<std::wstring> m_Files; // Recently used files
why not just use:
class XXX
{
public:
std::vector<std::wstring> m_RecentlyUsedFiles;
FFS4 -
Just saw my professor coding in F# and it made me wonder, is F# still relevant/ useful in todays world?
I never saw anyone code in F# until today...6 -
Hate my fucking ‘Logic’ class. Teaching us if, or, and, etc statements and when something is true or false so far. Fair enough, part of logic. But fucking 6 classes on the same topic, isn’t helpful. Especially since it feels like the same shit I learnt myself when I was 13 and a junior in High School.
People are all surprised at it, even the Computer Science majors. This shouldn’t be a shock to you on how these statements work if you’ve coded for a few minutes in the University. You should’ve learnt it in your first programming class.
Ugh, just how I feel about this class. Have to take it to get my degree, otherwise I would’ve dropped it by now >.> Waste of time and money for me.12 -
class name for section named "liability" is "liab"
class name for section named "dedcutible" is "deduct"
class name for section named "personal property" is "personal-prop"
class name for section named "personal liability" is "personal-liab"
I don't know who you are, but you are a twisted evil teammate and I wish you fired.
You've ruined my day, hope you're happy.2 -
Me, scrolling my way thru a class:
Holy motherfucking, incestloving, glueeating, cognitivedeprived cow!!! I swear whoever made this sorry excuse of a "class" should burn in the deepest, farthest, sweatiest part of the devil's arsecrack being stuck in between his arsechee---
*scroll reaches top of the class*
/**
* @author: Me <me@gmail.com>
*/
Me: *cries* -
I'm reluctantly in charge of my company... for now. Trying to avoid any of those fancy, personally cringe-worthy, titles like owner, boss, acronyms starting with a C.
My solution, suits our unique branding, is having my role as:
DragonOverlord
Any arguments as to it actually being a position are quickly thwarted, as it's obviously a class.19 -
I'm writing code then used Imperial class instead of Impression class. My brain is on star wars mode.
-
Co-worker told me my code isn't up to" standard" and I don't follow "relevant convention" because I don't use a space after declaring a class/function AND inside the parentheses:
Me: class MyClass(something):
Her: class HerClass ( something ):
How do you do this personally?9 -
Apparently I was the only one that didn’t get the “let’s skip the 9am class” memo. Drove an hour to school only for class to be canceled. EAD.
-
class Bug():
def __init__():
self._fix = random.randint(1, 6)
def fix():
if self.is_feature :
return Feature(self)
else:
if random.randint(1, 6) == self._fix:
Bug()
del self
else:
return Bug() -
Just use proper variable name and class architecture and header file and viola you don't need documentation.
In the worst case to understand class heirchy use the graphviz of doxygen and you are done.7 -
What do you think about class-based OOP vs. Prototype-based OOP?
I think that class-based OOP is an unnecessary abstraction of structs, functions and global variables most of the time.16 -
I'm going to do my os class in uni and need a Linux environment for it.
Which distro should I go for?
+ Would be if I could do webdev on it too (performance)
Coming from windows23 -
$ python
>>> class Object:
>>> pass
>>> self = Object()
>>> self.attr = val...
>>> * copy paste code from some class
<Ctrl>+d
Testing ☑️ -
In computing class, we were asked to identify different connectors/ports in one lesson.
Someone couldn't tell what a USB port looked like >.>3 -
Lmfao, in a book teaching Java, there's a chapter that contains a class called AddMeth to illustrate adding a method to a class.
They could have used a better name, though..7 -
Him: "dont put your constants in a standalone class, it defeats the purpose of OOP. A class is for methods and such."
Me (in thoughts): THIS IS PYTHON YOU OEDIPUS, WHAT ELSE SHOULD I DO IF I DONT WANT MY CONSTANTS TO CLUTTER THE FILE??1?
But using the enum-class as superclass maakes it ok for him... -
This moment when you worked 500h on a awesome class that will fix thousands of your problems.
And suddenly you find out that Qt already offers a class like that :c2 -
When the browser reads 'clas' as 'class' and things oddly work as expected. But when you fix it to be 'class' everything breaks horrifically.1
-
I know I ranted about this before but...
FHEGYOQOBGMLAEBFOEBFKHIOQMBEVCOFARQIJSABUEVEUANGIWN
Dumbass me thought "I know it's fucked up in the past but give it another chance". My google home decided to delete all of my alarms. It will not be getting another chance.
I woke up 3 hours later than expected on a normally smooth day and now I going to be late to class and I'm anything but calm.
I'm about ready to frisbee this shit out my window. -
So my computer crashed while I was coding in eclipse. I turn it on and the class I was working on is absolutely empty, only one empty line
It wasn't a big class, but that still hurts2 -
I asked at an interview if they documented their code with class diagrams.
One of the interviewers told me: "Good code doesn't need a class diagram"
...
*TRIGGERED*4 -
Welp, who wants to see my first website? tiny.cc/copo
It was made almost entirely during english class, for blocked games. It's the most hits I've ever got one a site I've made. But the best part? I achieved my goal: respect from the teachers. And why did they respect me? *Because it got blocked*. Yup, across the entire county (our county is one of the top five in the USA for schools I believe). We, as the students, found a way around the teacher's technological control, and finally got some technological freedom. Just a small story.
P.S. not named by me, and sorry bout that JS redirect. I redesigned it while I was supposed to be writing about the theme but the original is couchpotato not cppremium. I can't change it now but I'll change it later. I trust you guys know how to stop it without me changing it though :)8 -
Well, I'm now making apps for Android in my class. This is going to be fun. (Sarcasm, please don't make me do this)3
-
When your comp sci teacher didn't get mad that everyone skipped class.
Next period he went on like we never had class
#blessed1 -
Me looking for motivation to get out of bed and go to class in the morning.
"Devrant will be faster with the college WiFi when you browse in class rather than in your room".1 -
In large projects, eclipse is so bad that rename of a class can last up to whole minute.
make that an new class, 0 references. still whole minute. How can you fuck up so badly???1 -
Perfect use of DI in .NET Core project.
> Passed logger object in UI project's controller class constructor.
> Then pass it to internal class.
> Then pass it to business project.
> Then pass it to another class and finally used logger in a method to log exceptions in try-catch1 -
Don't people learn the basics of how things work anymore ?!
I am cleaning this project, where some juniors have implemente a lot of the code.
Apparently, the way of deleting an entity from the database is:
1) SELECT the entire row and cast it to a model class
2) CONVERT that model class to a DTO class
3) READ the Id property from the DTO class
4) SELECT the entire row, again, and this time cast it to a DTO class
5) CONVERT that DTO class to a model class
6) Use you pancy-pants ORM delete method using the entire model class as input argument..
FUCK YOU !
inb4 what about reference checks ?
- Nope. That is done separately using only the Id
inb4 what about checking if someone else has altered it before deleting
- Nope, the entire entity is not used for that either.3 -
Was asked to crimp a simple Cat5 LAN cable in today's networking tutorial class. Little did the lecturer know I had been doing that (usually Cat6) for almost a year. Walked into the class 30 minutes late, terminated both sides within 5 minutes and just sat there helping my friends for the rest of the 2 hour class...1
-
Class components, although verbose at times, are still far superior than functional components in React. The more I work with React, the more I believe that: Hooks are plain shit.
-
In a Computer Systems class, we had a project to debug and buffer-overflow a program written in x86 Assembly. There were 2 mandatory problems we had to figure out, but the teacher told us there were 6 in total that can be solved. Not only did I complete all 6 on the next day (the project was due 2 weeks from then), I also noticed something looked weird in the code, so I investigated and found a hidden 7th problem and solved that too. Only one in the class to do so, and the teacher said I was the best student in any of her classes this year.
-
Taking a class at University. Professor just gave us the CDF for the midterm scores. I have no idea how to read this.
Too afraid to ask in class!5 -
So I know this sounds crazy, but I'm writing a GUI in Python to automatically generate HTML for me. I may add support for CSS, but I'm not sure yet. Anyways, I was trying to replace an object's dictionary with a dictionary I was building in the GUI class. I was trying to replace the dictionary or reference it some way, when I have a place in the element's constructor to handle this exact situation.... I just had to put the temporary dictionary into the constructor.2
-
!rant
First class mail for first class stickers! Thank you @dfox and @trogus, keep up the awesomeness4 -
Why Android uses so many quirky features in Java, like inner and anonymous classes, callbacks and nested generics?
I searched everywhere for the reason but can't find why, only how.
I rarely use these features outside of Android development.4 -
Why am I the only student that others in IT/programming class look up to when it comes down to basic c++ programming??!
It's not *that* hard. Just read the book provided to you by school, goddammit! Just because I can write and use more than one dimension in an array DOES NOT make me any better in prigramming!(or maybe it does, idk)
But, as much as I hate those lads, deep within myself I want to help them get as best of scores in finals as they can. Here's hoping they come around to realise that and pay attention when I try to give them tips...1 -
In a class right now. The rants are more interesting than what the professor is teaching!
How our professors teach:
Step 1: Open up a PDF of the subject book.
Step 2: Read everything line-by-line.
Step 3: "Refer the internet".
Yeah, because I don't have the book to read the shit you're teaching.1 -
My co-worker told me that he doesn't use class mutators because it just makes the class long and dirty. Should I be afraid?1
-
A DSA teacher who didn't write a simple line of code in class. No, not even the pseudo code. Teaches us A,B,C,.. in class and expects us to sing songs during the exam.1
-
If somebody needs a project idea how about a really dumb JS Framework that allows you do basic DOM Manipulation, just like jQuery, directly in the elements class attribute.
For example this is how a document could look like:
<body class="init-hide-id-otherElement">
<button class="onclick-show-id-otherElement">
<h1 id="otherElement">Hello</h2>
</body>
What this does is first, at the body's init-* class, it hides the element with id otherElement at page load. Then, when you click the button, the element with id otherElement gets shown. Instead of *-id-* you could also use *-class-* which selects a class.
Basically the syntax is:
<event>-<action>-<id/class>-<the elements id/class>
Of course this has a lot of limitations, for example the selectors are very limited, but it would still be very cool!3 -
I gotta say. Zig generics / comptime code gen remind me of old (pre-prototype) JavaScript code where you construct an object using parameters and return that object to be used as a class (except in this case it's actually turned into a class at comptime instead of an object masquerading as class)28
-
This is Node.js FYI
Exporting a single class from a file called util.js. This class only has static methods. Each method is a util function. No fucking way of importing a single method. Class abuse?6 -
Can someone recommend me good alternatives to draw.io to create class diagrams (UML) for programming online?4
-
In the middle of the semester, my class and I are going to have a class about threads in Java. The teacher is at his normal days, 10 minutes later he just looks at us and says "Do you want to teach? Do you want me to teach today? You know what? I won't teach today. Let's talk about each other, I want to know you more. Tell about your hobbies, what do you do besides your student life?" 😂
-
print(type(signal))
print(type(-signal))
print(type(-1*signal))
returns....
<class 'numpy.ndarray'>
<class 'numpy.float32'>
<class 'numpy.float64'>
ffs.2 -
I once was sitting in a somewhat boring class on networks and computer architecture towards the end of the term. Nobody was really listening and the lecture was kind of a collection of random bits and pieces related to the subject matter.
So I tried out playing Duke Nukem on my rather weak laptop on DosBox. I was sitting quite in front of the class room, and the profesor could clearly hear my fan working like crazy. Later in his lecture he did a short excourse on cloud gaming, showing us nVidia's graphics card cloud where you could do remote gaming, the graphics being rendered remotely and streamed to your box over the interwebs.
I looked up from my game and said to the professor: "If I had this now, my fan would not be that loud." Even the professor laughed. -
So last semester for my English class, I had to learn a "new skill" and write an essay [the final] about it. So naturally instead of taking the time to learn something new, I just slapped together a c# (in which I'd say I'm already fluent) calculator app with winforms.
When it came time to present my "new" skill to the class, everybody was overimpressed. Then at the end of my little presentation, one guy goes "Oh! Is that all done in HTML?".
Without giving it a thought, I instinctively replied "No, it's a programming language". He just looked so confused after that. -
I came to class today because an exam was on the schedule. Instructor starts lecturing and I realize that I stopped going to this class because of how slow the lectures were and figured I'd learn it myself in half the time.
Exam was delayed just like I had originally thought, but I forgot and only came with what I needed to take the exam. Now I am stuck here for the next hour without anything to do, just my phone :/5 -
When comments find their way to class tests:
“TODO: Finish conjugation of montre in the whole text”. I had no idea of the conjugation and finished under time pressure so this stayed in the class test (gave it back last second) and I was well aware of it.
Just wondering what the teacher must have thought. Didn’t say (or write) a word about it tho.
Should see if someone tweeted or posted this (I mean someone wrote a book only with examples of stuff like this)
Idk, I should ask if I’m allowed to write class test in an IDE. And set MARK, TODO, etc. Would make them a lot easier.30 -
Tried to change a overriding method in my C++ class to override another method using "refactor - rename" from my IDE, ended up changing the header of the parent class which is not even in my source tree.
-
javac MyDay.java
MyDay.java:5 error: cannot find symbol
Coffee coffee = new Coffee();
^
symbol: class Coffee
location: class MyDay -
Oh boy, I just made a class with 5 methods and 10111 lines.
I'm "proud" of myself
(It's kind of an autogenerated class for, but nah...)2 -
Learning Java after learning python for School and helping the new programmers who are in the class I finished last term. I see python code and get nervous because there’s no semicolons or curly brackets, but then again I’m like “Fuck I miss python!”
But I’m usually the go to guy when people need help because I make YouTube tutorials for my colleagues to help them understand what I’ve learned, and share flash cards on quizlet, and generally tell anyone if you need help I’ll help. -
!rant
C++ / OOP QUESTION
I have a uni assignment / project (Data Structures class), where I have to implement the ins-n-outs of 1D arrays, by creating a dynamically allocated array class, which can accept any type of data (using templates). But there's a problem.
I'd like to implement sorting the elements of the array. But given the fact, that I'm using templates, I cannot treat the elements as integers, nor as strings, or other types...
Also, let's say that the elements of the array are elements of class T, where T looks like this:
class T {
private:
double height;
int age;
string name;
public:
double getH() { return height; }
int getAge() { return age; }
string getName() { return name; }
};
(It's just a random example, pls don't judge for code quality...)
Let's say that I'd like to sort the T elements based on height, print out, sort by age, print out, then sort by name and print out. How can I do this? Is this possible?5 -
Oh DevRant community, I've come seeking for help and wisdom.
In my university the basic programming course uses Java and it's getting a bit outdated. The class has a lot of resources, like online videos and examples, but teachers from other departments say that the class doesn't teach students correctly.
I'm a student at that university, and I'm working in a group tasked to diagnose the class and seek for possible solutions. I need to know if some of you know about tools used to teach programming and algorithmic thinking in an interesting way at a university level. Something like Scratch or Karel, but for university students. If you have an example university I would love that!3 -
ICT class.
Class title: Excel as DB
It was about filters and sorting.
The closest thing to a db was that I found an INDEX function while I was bored... -
HOLY FUCKING SHIT
WHY IS THIS CLASS SO FUCKING FULL OF INCORRENT INFORMATIONS?????????
I've started university last year ( 2017) and I got a class named "Basics of Informational Communication Technologies" and it's so freaking bad...
The book is obviously just an english book translated to our language and signed by the proffesor. I've been trying to study it right now but it's so frustrating and I'm just 15 minutes into reading. HTML is not a programming language, viruses are not always under 4 kb, source codes are not always based on classes and so on....
Not to mention so many badly explained stuff that could be explained soooo much better and simpler...
How do I deal with this? -
In a Phaser game, I was unknowingly overriding a method of a parent class. It must've been Phaser.Group or Phaser.Sprite that my class was extending, I was calling destroy() on it without realising I was calling the parent class' method too and was baffled about why shit wasn't working. Found out maybe two days later and changed the method 'destroy()' in my class to 'pokeItWithAStick()'. This was at a previous job, but I'm mostly sure that it stays that way in the codebase three years later.2
-
Making classes and functions without commenting what I expect each class and function to do. Which means that my classes and functions have really long names.
Example Code:
Class ReallySpecificClassToWorkWithThisFramework { ...
public void DoThisActionInTheFramework (obj TheKeyToTheWholeFunction) { ... }
} -
Just to clarify my previous rant:
In this case, refactoring meant changing class, method and variable names -
<div id="header" class="hidden-xs hidden-sm">...</div>
<div id="header-mobile" class="hidden-md hidden-lg">...</div>3 -
Why the pointer of member function so special.
trying make a non-template class that like std::function but simpler:
1. wrap static function pointer.
2. wrap class member function pointer and the class object pointer.
3. WITHOUT ALLOCATE MEMORY.
I can't store member function pointer because the size is undefined?! -
Error Message : No ClassToInherit class found. There must be a class which inherits from ClassToInherit in the namespace 'blah'.
okay but there is a class in that namespace which inherits from ClassToInherit.
I hate private frameworks. -
This is practically impossible to goole due to the generic nature of the words:
I need a CSS selector to match all parts called "tab" with class "active" within a component. For some reason
my-component::part(tab).active
doesn't work, and I don't know if it's a bug or not.6 -
Math.abs(x) I use this a lot, along with all trigonometry functions, which I love and am also glad they are implemented2
-
My housemate (we are college students) once said he was finding it weird his name wasn't in the list of students to take the exam of a programming subject he had but he couldnt find a reason to explain it.
A few days later he came into my room frustrated as hell but laughing at the same time. "I have to stop taking headphones to class... I've figured it out. I failed already for being absent because when the teacher registered the students present I had my headphones on e every time and couldn't hear him..." 😂😂😂 -
Am I the only one having a really hard time grasping code when it involves more than just a few classes devided into several files?! I simply can't follow what happens when method a in class b instantiates class c and d while implementing interface e injection dependency f and extending class g...!?
Does this make sense? -
Class cleanBullshit() {
Function invokeAction(attr) {
If(attr==='sarahah' ) friend.remove();
}
}
Class private mylife() {
var per = new cleanBullshit();
per.invokeAction('sarahah');
} -
!rant
Today i had my first class of this semester. Meanwhile, there was a small party on campus. I was having math class "listening" a playlist with "Stayin' Alive" and "I Will Survive".
Best soundtrack to my class :D5 -
My programming class kinda sucked. Here's why.
1. They taught C++. To students who had never seen a line of code in their lives. The language with 90+ keywords.
2. The teacher. We had to use switch statements to do something. It took around 300 loc. I used an array and shortened it to 5. He took some points away for not doing it correct. IT LITERALLY WORKS THE SAME AND IS SHORTER. This was not the first time I had shortened something/made it more readable and been docked points on the assignment.
3. Commenting. He told us to comment as much as possible, which is not correct. Comment what needs commenting. Not everything.
4. The compiler. We worked on windows with an online compiler. He decided teaching us to set up a compiler was too hard. We used onlinegdb, which isn't inherently bad. However, onlinegdb is based on Linux. He compiled our programs with a windows compiler.
Maybe these are just problems because I've programmed before that, but I still think they are red flags. What do you think?3 -
So is the difference between inheritance and composition is that of a fridge and iceman?
class Man {
fun greet(){return "hi"}
}
class IceMan extends Man{
override fun greet(){return "hi i am iceman"}
fun getIce(){return "ice"*Random.nextInt()}
}
class Fridge{
private Man manAi;
private String s = "ice";
fun greet(){return manAi.greet()}
fun getIce(){return s*Random.nextInt()}
}
}
=========
Basically , in first case, a class is getting features by inheriting from parent while in another case, a class is getting features by internally having objects of other classes that could provide those features?6 -
Try to teach to my girlfriend what is a class and what is a object.
Class is methods and attributes
My girlfriend starting sing "dans l'attribut de Dana" 😂🤣
Course is finish for today 🤣6 -
What I have seen is a completely new class created copy pasting an existing class and renaming the name. When I try to access the properties I am shocked. When I opened the Class implementation.
-
I'm trying to understand Dependency Injection.
can I say dependency injection represent a class that is dependent of another class?11 -
Does a non-awkward way exist to specify a child class as argument type in a parent class method in TypeScript when the classes are defined in different files?4
-
Really appreciated the first professor of front end developement. He was very helpful and his teaching always very detailed. Always looked forward to his class. Heard he is working for the army intelligence now. Definitely gonna buy him a beer if I see him again, I owe him that much.
-
In python, is there a way to make this work?
----------
# list of people
people = ["Nick", "Sue", "Bob"]
# class instance
Bob.pockets = ["gum", "paperclip", "coins"]
# convert string to prefix of a class instance
Print(people[2].pockets())
----------
This is the simplest way to show what I'm needing to figure out.
I need to convert a string into the prefix of a class instance.
I'm having trouble figuring it out.7 -
I start my summer class tomorrow; Applied Probability and Statistics. I took a look inside the textbook for the class, and now I want to kill myself. Oh well, at least it's not Calculus 2.5
-
Today I made a class to do one simple thing. Duplicate a database entry along with a few of its relationships. At first it didn't make sense to create one class for that but I decided to follow my SOLID gut. It ended up being almost 100 lines long with just one entry function working as a route controller. Thank God for SOLID principles...
-
Someone in my programming development class at college asked "is php or c++ lower level" and after having worked with a large php codebase for over a month at work I wanted to laugh in pain1
-
For the people investing in crypto: http://imgur.com/a/C32Taqt
A small reminder I made in IT class of course using the best programming language of all times about the best coin of all times. -
/**
* Class TransactionModel
*
* @codeCoverageIgnore
*/
public class EtlNotifyRepository extends DatabaseRepository implements EtlNotifyInterface
{ ... }
Copy/pasting doc ain't good D:2 -
Design question for y'all
Context: python lambda
Better to make classes for dictionary objects holding strings between methods
Throw strings around separately
Throw the dictionary around6 -
Hello, chat, i have this annoying and frustrating problem that is making people angry around me, and i dont want to get into details, but basically its about whether a child class should contain the driver class for its parent class in java. Could somebody please tell me which way is the better way to write decent code and why.7
-
Explain to me like I'm retarded why underscores are not desirable in a java class names besides, it's not the common convention.
Context:
FooBarLongClassName_OtherClassNameVisitor for a visitor class. This is the name of a class11 -
So how is everyone's day going, me?
Well i'm silently screaming because I just finished building a long class only to find out im trying to extend a compact class .-. -
Felt like an idiot when realized that argument `back_populate` refers to the attribute of the class passed to `relationship`, not the stupid name of the table of any class, ugh
-
I can't count likes form my database for an specific post. I made a function that will count all the like by "post.id". It shows the like on the web page when I clicked on like button and it disappears when I refresh the browser. but likes are still remaining in the database but it won't appear on the webpage.
Here are the flask code:
def like_count(post_id):
if request.form.get('like') != None:
if (Like.query.filter_by(post_id=post_id).all())==[]:
return 0
else:
return Like.query.filter_by(post_id=post_id).count()
else:
return 0
def dislike_count(post_id):
if request.form.get('dislike') != None:
if (Dislike.query.filter_by(post_id=post_id).all())==[]:
return 0
else:
return Dislike.query.filter_by(post_id=post_id).count()
else:
return 0
Here are the html code:
<!--dislike-->
<form method="POST" action="">
<input name="dislike" value="1" class="input-style" >
<input value="{{post.id}}" name="post_id" class="input-style">
<button class="fas fa-thumbs-down" class="like-button" >
<div class="like-count" >
{{dislike_count(post.id)}}
</div>
</button>
</form>
<!--like-->
<form method="POST" action="" >
<input name="like" value="1" class="input-style" >
<input name="post_id" value="{{post.id}}" class="input-style" >
<button class="fas fa-thumbs-up" class="like-button" >
<div class="like-count" >
{{like_count(post.id)}}
</div>
</button>
</form>8 -
Need to add a new derived class which inherit from class "lorum" that is in file "lorum.cpp". Other derived classes are inside the file "lorum.cpp"
Should I put the new derive class in file "lorum.cpp" or make a separate file for the new derived class?
Why do I need to ask this question...2 -
<!-- start of xyzAwesome widget-->
<DIV class = outerWRAPPER >
<DIV id=specialContainer class="small">
<DIV CLASS= "extra-large">
<DIV class="inner_wrapper blue">
What do you mean my code sucks?
</span>
</span>
</div></span>
<!-- end of sub container -->1 -
How the hell can a framework like Zend 3 have an instance of a class, this container, this service manager, that is basically responsible for instantiating everything but not have it accessible on a global level? Why do I have to create a factory class for every class that i intend to have access to this service manager? Zend is bull-fucking-shit.
-
Ok see this "trend" of adding a number 2 to a class name. To denote the new version of an object, surely I'm not the only person who thinks this is horrible. E.g Entity2, Renderder2 etc. It just creates a really bad API, I understand it's needed for backwards compatibility, but honestly there must be a better way....5
-
Everytime i go to my class for java i forget a shit ton of what i learned last class.... and i hate it
-
The most fun thing in boring online class is when someone accidentally switch on mic and speak things unknowingly🤣🤣🤣... It will wake the class for atleast some minutes😂4