Details
-
AboutStudent
-
SkillsC, C++, C#, Python, Java, Pascal, Dephy
-
LocationLjubljana
-
Website
-
Github
Joined devRant on 5/14/2016
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
-
Today I experienced cruelty of C and mercy of Sublime and SublimeLinter.
So yesterday I was programming late at night for my uni homework in C. So I had this struct:
typedef struct {
int borrowed;
int user_id;
int book_id;
unsigned long long date;
} entry;
and I created an array of this entry like this:
entry *arr = (entry*) malloc (sizeof(arr) * n);
and my program compiled. But at the output, there was something strange...
There were some weird hexadecimal characters at the beginning but then there was normal output. So late at night, I thought that something is wrong with printf statement and I went googling... and after 2 hours I didn't found anything. In this 2 hours, I also tried to change scanf statement if maybe I was reading the wrong way. But nothing worked. But then I tried to type input in the console (before I was reading from a file and saving output in a file). And it outputted right answer!!! AT THAT POINT I WAS DONE!!! I SAID FUCK THIS SHIT I AM GOING TO SLEEP.
So this morning I continued to work on homework and tried on my other computer with other distro to see if there is the same problem. And it was..
So then I noticed that my sublime lint has some interesting warning in this line
entry *arr = (entry*) malloc (sizeof(arr) * n);
Before I thought that is just some random indentation or something but then I saw a message: Size of pointer 'arr' is used instead of its data.
AND IT STRUCT ME LIKE LIGHTNING.
I just changed this line to this:
entry *arr = (entry*) malloc (sizeof(entry) * n);
And It all worked fine. At that moment I was so happy and so angry at myself.
Lesson learned for next time: Don't program late at night especially in C and check SublimeLInter messages.7 -
I went on vacation in Norway. And it's mandatory to visit viking ship museum if you are in Oslo. At the of the exhibition I came to souvenir shop. AND WHAT I SAW WAS MAGNIFICENT!
There was whole army of ruber duck vikings.
I thought of buying one but I didn't have a heart to replace my police officer McDucky.1 -
Got this shirt today 😎 super happy and excited 🤓 I am definitely going to wear this one tomorrow 😀5
-
!rant
It's rather a question. I am thinking of changing my Linux distro from Lubuntu to Arch Linux or Gentoo.
My main reason is that I want to achieve customizability and the freedom that Linux offer and also build my distro from ground up.
Second reason is that I want to switch a little bit I am using Lubuntu for 2-3 years and is worked great for me. Especially because I have an older laptop (Asus K53E) and windows 7 worked really slow on it. But with this distro, everything works much faster and has all features and tools for programming that I need despite being minimalistic.
I have also used other distros before this one. These are some of them that I can remember Ubuntu, Xubuntu, Mint, Bodhi Linux.
I would say for myself that I am quite familiar with terminal and I also wrote some bash scripts on complexity level like these: https://github.com/RokKos/..., https://github.com/RokKos/...
But my main concern is that would fail to install any of this two distros or that I would damage my computer beyond repair...
So my main questions are:
What are you experience with this two distros?
Did you have any troubles installing and setting up distro?
What is overall experience with this two distros?
Was is worth to switch to any of these two?
And you could also share what distro you are using and maybe some rants that occur using them.14 -
I was 15 years old and the first year of high school. Everything was new to me and I was such a newbie. At that time I had 2-3 year of programming behind me at an institution where they taught competitive programming. And I knew something about computers. Not much but more than most of my school mates. At that time I wanted to become "super cool hacker".
So we had this very very thought teacher for history which was also our form master. She really knows how to explained everything about history and in an interesting way. But while she was teaching we also had to write down notes from her powerpoints that were on a projector. And occasionally she would wait for us to copy everything and then move on with her lecture. But sometimes she didn't. This was frustrating as hell. The whole class would complain about this because you couldn't take notes down normal, you had to do it at double speed.
But she got one weak spot. She was not very good with computers. Our school computers were locked in some kinda closet so that students didn't have physical access to a computer and were also password protected. So I came up with the plan to plant wireless mouse in her computer so that I could control her mouse. At that time it seemed like SUPER HACKER MASTER PLAN.
So I got an opportunity one time when she left the classroom and let closet where the computer was open. I quickly sneaked the USB of the wireless mouse in the computer and then go back to the seat.
So THE FUN began.
Firstly I would only go back in powerpoint so that all my schoolmates could write down notes including me. And it was hilarious to watch when she didn't know what is happening. So then I would move her mouse when she tried to close some window. I would just move it slightly so she wouldn't notice that somebody else is controlling mouse. And by missing X button just by slight she would click other things and other things would pop up and now she had to close this thing so it became a nightmare for her. And she would become angry at the mouse and start complaining how the computer doesn't work and that mouse doesn't obey her.
One time when she didn't pay attention to her computer and projector I went to paint program and drew a heart and wrote we love you (In Slovenian Imamo vas radi -> See the picture below) and one of my school mates has the picture of it. We were all giggling and she didn't know what is was for. And I managed to close everything before she even noticed.
So it got to the point where she couldn't hand it more so she called our school IT guy so that he would check her computer (2 or 3 weeks passed before she called IT guy). And he didn't find anything. He was really crappy IT guy in general. So one week passed by and I still had messed with her mouse. So she got a replacement computer. Who would guessed all the problems went away (because I didn't have another mouse like that). I guess when our IT guy took the computer to his room and really thoroughly check it he found my USB.
So he told her what was the problem she was so pissed off really I didn't see her pissed off so much in all my 4 years in high school. She demanded the apology from whom did it. And at that moment my mind went through all possible scenarios... And the most likely one was that I was going to be expelled... And I didn't have the balls to say that I did it and I was too afraid... Thanks to God nobody from my school mates didn't tell that it was me.
While she waited that somebody would come forward there was one moment when our looks met and at that moment both of us knew that I was the one that did it.
Next day the whole class wrote the apology letter and she accepted it. But for the rest of 4 years whenever was there a problem with the computer I had to fixed it and she didn't trust anybody not even our IT guy at school. It was our unwritten contract that I would repair her computer to pay off my sin that I did. And she once even trusted me with her personal laptop.
So to end this story I have really high respect for her because she is a great teacher and great persons that guide me through my teen years. And we stayed in contact.11 -
UPDATE ON MY GAME DASH WAVE :D
From last time that I showed you my game that we made on global game jam, I and my programming partner decided that we would take this game as a hobby project. So we upgraded it a little:
- we added the tutorial,
- leaderboards,
- indication where you clicked,
- tweaked enemy behaviour,
- changed the way the score is calculated
-and other small fixes.
But we didn't do anything to the core mechanic.
I would really thank all devranters and also my family and friend that downloaded the game, played the game and gave it positive feedback and pointed out some bugs to fix. You really gave me motivation.
Here is link android version: https://play.google.com/store/apps/...
Here is link windows version: https://rokkos.itch.io/dashwave
So do you want to be updated with the game progress and maybe also some rants about developing?1 -
This weekend had everything but sleep :D But it was worth it. We made the game called Dash Wave in 48 hours on Global Game Jam.It was an amazing experience. Here is the link to the game: https://play.google.com/store/apps/...
http://globalgamejam.org/2017/...11 -
Police officer McDucky reporting for duty. Hope we catch a lot of pesky bugs and complete projects.3
-
So many stickers so little space..
But there is always place for devRant :D
Thanks @dfox and @trogus7