Details
-
AboutComputer Science student and Math lover.
-
SkillsI was ending up becoming a front-end developer, now I'm thinking to become a farmer after uni.
Joined devRant on 3/4/2017
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
-
Once I configured someone's bashrc so that everytime he opened the terminal he would get a creepy ascii art version of Sans from Undertale. We both are big fans.
A nice prank vould be starting sshd on someone else's pc and changing stuff here and there the whole day.
Of course "don't do this at home", I suppose it might be dangerous and I have no idea how to do it in a safe way.1 -
Ok now I'm gonna tell you about my "Databases 2" exam. This is gonna be long.
I'd like to know if DB designers actually have this workflow. I'm gonna "challenge" the reader, but I'm not playing smartass. The mistakes I point out here are MY mistakes.
So, in my uni there's this course, "Databases 2" ("Databases 1" is relational algebra and theoretical stuff), which consist in one exercise: design a SQL database.
We get the description of a system. Almost a two pages pdf. Of course it could be anything. Here I'm going to pretend the project is a YouTube clone (it's one of the practice exercises).
We start designing a ER diagram that describes the system. It must be fucking accurate: e.g. if we describe a "view" as a relationship between the entities User and Video, it MUST have at least another attribute, e.g. the datetime, even if the description doesn't say it. The official reason?
"The ER relationship describes a set of couples. You can not have two elements equal, thus if you don't put any attribute, it means that any user could watch a video only once. So you must put at least something else."
Do you get my point? In this phase we're not even talking about a "database", this is an analysis phase.
Then we describe the type dictionary. So far so good, we just have to specify the type of any attribute.
And now... Constraints.
Oh my god the constraints. We have to describe every fucking constraint of our system. In FIRST ORDER LOGIC. Every entity is a set, and Entity(e) means that an element e belongs to the set Entity. "A user must leave a feedback after he saw a video" becomes like
For all u,v,dv,df,f ( User(u) and Video(v) and View(u, v, dv) and feedback(u, v, f) ) ---> dv < df
provided that dv and df are the datetimes of the view and the feedback creation (it is clear in the exercise, here seems kinda cryptic)
Of course only some of the constraints are explicitly described. This one, for example, was not in the text. If you fail to mention any "hidden" constraint, you lose a lot of points. Same thing if you not describe it correctly.
Now it's time for use cases.
You start with the usual stickman diagram. So far so good.
Then you have to describe their main functions.
In first order logic. Yes.
So, if you got the point, you may think that the following is correct to get "the average amount of feedback values on a single video" (1 to 5, like the old YT).
(let's say that feedback is a relationship with attribute between User and Video
getAv(Video v): int
Let be F = { va | feedback(v, u, va) } for any User u
Let av = (sum forall f in F) / | F |
return av
But nope, there's an error here. Can you spot it (I didn't)?
F is a set. Sets do not have duplicates! So, the F set will lose some feedback values! I can not define that as a simple set!
It has to be a set of couples, like (v, u), where v is the value and u the user; this way we can have duplicate feedback values in our set.
This concludes the analysis phase. Now, the design.
Well we just refactor everything we have done until now. Is-a relations become relationships, many-to-many relationships get an "association entity" between them, nothing new.
We write down on paper every SQL statement to build any table, entity or not. We write down every possible primary key or foreign key. The constraint that are not natively satisfied by SQL and/or foreign keys become triggers, and so on.
This exam is considered the true nightmare at our department. I just love it.
Now my question is, do actually DB designers follow this workflow? Or is this just a bloody hard training in Pai Mei style?6 -
I have no words to describe how I'm feeling these days. I have to do a C project for uni.
After a couple of years dealing with web dev, javascript, typescript, angular and stuff, for the first time I have a project where I have to deal with only two problems:
1) my code
2) my machine
No tools, no bloated libraries, no webpack, no json configurations, no tutorials.
It's just me, vim, gcc (actually nvcc, it's a cuda based project, but still) and the cuda manual.
I feel I'm actually building something.
Plus, the guy I'm doing the project with is cool with this stuff and most important he's open minded.
I'm happy9 -
I often see desk setups where there is a screen on the top of everything.
Isn't that really dangerous for the eyes? Afaik you should always look down when looking at a screen10 -
Shower thought
I'm pretty sure flutter is going to drop the app prices due to how it's easy to build a ui.
What ia going to keep their price high is a good and innovative graphic design5 -
Some time ago in a telegram group a guy triggered me when he complained that "most students after the degree have no idea how to correctly implement the mean of a series of numbers".
Then he asked: "does anyone here know how to do it?"
Three people answered, including me, none gave the correct answer.
Eventually I got it, but now...
How many people here know how to implement the mean of a series?16 -
That moment you realize you are at the end of that period of life when you have a lot of free time...
I recently moved and live on my own. I'm still studying and I'm finding small jobs as a developer (I make the money I need to live). So far so good, but recently I found out that the career path I'm taking it's not what I actually want to do.
I do not regret it, I'm happy and I feel lucky comparing myself to others in my country.
But I can't stop thinking that the more I go on the less choices I can make freely and that growing up sucks sometimes.3 -
That moment on saturday morning when you realize what you missed for the last 5 months in the framework you are using at work and realize you can delete about 5000 loc with some refactoring...
Fuck guys I just got a huge Eureka moment that probably made me level up.11 -
I always knew somehow, without realizing it. Since I was a kid I always was fascinated by technological stuff.
My parents are into humanistic fields so they couldn't give me any good input to understand what I liked exactly.
One day I learned I cpuld tinker with stupid batch scripts until I read on some forum the word "programming".
I was like "wtf is that" and googled the word.
In that moment I realized what I was going to do in my life. -
Do you guys think that it would be possible to build a cryptocurrency that could replace traditional banking and money at all?
A non anonymous cryptocurrency, that could guarantee enough privacy to not be used for surveillance but at the same time could be used by common people.
I had this thought recently but at the time of writing ( :P ) I haven't enough knowledge and time to go deeper than this (meaning "nothing").22 -
Tl;dr I am incredibly ashamed of my code at work.
I recently started working as a junior dev. I know many aspects of the stack I use, and I feel pretty comfortable when solving simple and specific problems.
But this is the first complete project I make, and I received no peer review until now. And my code sucks.
I tried my best to deliver a good and working code, but it became messy in too many places. Now it's too late to refactor.
Probably I just cannot see the right way of modeling specific situations, I don't feel I should blame the frameworks I'm using, but the point is that my code sucks. Or at least this is how I feel.
I'm going to leave this workplace soon (personal reasons, not related to this topic and/or the company), and I am kinda scared of the shit I'm about to leave to them. It's a very nice environment and they don't deserve this crap. Also I have some other good reasons to worry about this, but I cannot tell them.
My plan is to finish a couple or personal stuff I have to do and then spend as many hours I can on the project trying to finish it asap and make the code better (for now I've been working only 6hr/day).
I'm really thinking that I just suck at this.13 -
"Keep Ithaka always in your mind.
Arriving there is what you’re destined for.
But don’t hurry the journey at all.
Better if it lasts for years"
https://poetryfoundation.org/poems/...
For the sake of clarity, I just hope I'll never "make it" in what I do. I just hope to keep going on learning, experimenting and discoverying.
Whenever I'll get tired I'll look back at my past and then I'll decide if I made it.1 -
I still don't get what the impostor syndorme is precisely, so either I'm good enough to not get it or I constantly sell myself as an impostor.
Edit I think I fucked up english grammar...4 -
Read. Everything. CAREFULLY.
And do some research if needed.
Books are there for a reason.
Seems pretty obvious, uh? -
Tldr: no router, almost not work.
Ok I recently moved into a new house, and I signed a contract for an Internet line.
Problem is that the router has been sent at the ISP shop, where I was supposed to get it personally. But guess what? Covid emergency happened two days after, and the shop closed.
So, after spending two days calling customer service of both ISP and Postal office without being able to speak to anybody, I received a Sms saying that the pack was not delivered because the receiver was closed.
After some more unsuccessful calls to the same two entities I managed to find the actual shop's phone number, that was actually thw owner's house (he's working from home). I spoke to him, told the problem, and he changed the router destination to my house.
Today I checked the package status on the postal website and I saw that it seems that they tried every day, at 7:02 am, to deliver the bloody package again at the shop! I truly hope this was a bug on their tracking system. It's weird that the hours were always 7:02am, because the package delivery office opens at 8:30 am, so again I'm praying any existent and non-existent god that that's just a bug. I'm kinda tired of being stuck with my phone hotspot with limited GB and with ISP public routers with about 5Mbps.
I wish I had @netikras skills with router building.4 -
I don't understand how can Wikileaks be still active and publishing new stuff... Shouldn't it be like "pwned" by CIA or NSA or something? Can I trust whatever I see on that website?10
-
How much time do you take usually to code a backend with simple crud operations and notification system?
It's taking me some time, but I feel I'm going too slow...7 -
Someone here told me once that according to him/her OOP was often overengineered and I was wondering why.
Then, recently, I started diving deep into Symfony. And I got it.2 -
Dear Lord.
I've got an exam today. I remembered ot was at 9 am so I arrived at university at 8 am.
It turns out it is at 2 pm.6 -
1 - when I actually got the point of OOP
2 - When I got that I could check if a number was odd or even by doing & 1
3 - (in the future) when I will understand lifetimes in rust.20 -
I've always thought that emacs was just a text editor but... Emails? News reader? Web browser?
That's... awesome! What the hell...
https://gnu.org/software/emacs/...8 -
Here in devrant I often hear about tech companies taking awful technical decisions (e.g. https://devrant.com/rants/2162692/... ).
My question is: do this companies actually have success with their products? Or is the tech world full of huge failures we never discover?1 -
Well, here is another Intel CPU flaw.
I'm starting to think that all these were done on purpose...
https://thehackernews.com/2019/05/...3 -
This is yet another rant about php.
But I'll put my hands on first: I'm less than a junior and I'm looking for a backend language to learn.
So far I've been looking at php with Symfony because it's been used where I work.
Is it my impression or Symfony somehow overcomplicates everything? Like I don't know, for any stupid thing I get stucked (like yesterday, spent two hours on a circular reference problem with serialization).
Also, I don't like it's documentation. I am a book person, meaning that I need pages of text explaining how the framework (or whatever) works in a precise order.
Symfony's docs are like a graph: you often have no idea where you are or "what comes next".
Also, I feel like every page makes you just copy-paste everything without explaining very much what's happening under the hood.
I know there is a cookbook, but it's pretty outdated (like it's at version 3 or 2.7, I don't remember).
Is it just me? Do other Symfony developers experienced the same?10