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 - "gru"
-
Friend: Hey, can you fix my laptop? The hard drive is almost full.
Me: (Looking through his folders) Maybe it's because of this. Why do you have 3000+ files in your downloads folder? Maybe I should delete some of this.
Friend: No no, please don't touch the downloads folder, I have some very important documents there.
Me: Why don't you move them to a separate folder then? You should organize the ones you actually need and delete the rest. This folder is a complete mess.
Friend: No no, the problem is not the downloads folder, there must be something else. Can't you just uninstall some programs to free up space?
Me: I could, but I don't know which ones you actually use.
Friend: What? You should know!! You studied computer science for this!!
Me: First of all, there is not a single class in the whole 4 years of university called "How to uninstall programs and free up space on 128GB hard drives of shitty €400 computers". Second of all, I don't know why you were expecting me to find a magic button on your laptop that immediately frees up all the space in a hard drive without actually deleting anything. That's not how computers work, you know.
Friend: Hey if you didn't want to help me you could have said so in the first place.
Me: FML18 -
Fun fact: The word "sudo" in Spanish means "I sweat", which, in colloquial speech, can also mean "I don't give a fuck"8
-
!rant
So this year I had a subject at university called "Linux internal architecture", and for the last assignment I had to write a kernel module and interact with it with a separate program written in C.
Once I had finished and tested the driver, I went on to write the other program, which was supposed to use system calls to read and write data to the module. While debugging this program (~500 lines of code) I reached the level of frustration where you just start printing absurd messages everywhere in your code to see what's wrong. So for example instead of printing "This error happened in this function", my error messages were more like "Fuck this fucking function it doesn't fucking work".
Guess who forgot to delete all those messages before sending the code to the teacher...
Also, if a specific mode is selected, the program enters a while(1) that, apart from doing what it's expected to do, also creates a file in the user's home directory called something like 'motherfucker' and appends the words 'fuck this shit' to it. INFINITELY.
I really really hope this teacher doesn't try to run the program in his own computer, or he's in for a big surprise.8 -
Installed Arch. Failed. Tried again. Failed. Went back to Ubuntu. Tried again the week after. Failed 4 more times. Finally installed it correctly. Tried it on my desktop PC and failed 2 more times until I figured it out.
I'm never formatting my hard drives again.13 -
When you're so tired that you forget to put coffee in the coffee maker and get a cup of hot water instead.3
-
I'm supposed to be a techie and prefer all the digital stuff, but this is by far the best Christmas present I'll be getting this year5
-
So much swag arrived in the mail today.
It's funny how I end up paying for more stuff from a free app than from one of those freemium games that are so popular right now.5 -
My dad has been using android for about 4-5 years now. I just showed him how the notification drop down works.3
-
My dad has been using a Windows computer every day since 95. Yesterday he discovered that if you click the little tabs in the "details" view of the file explorer, you can sort the contents of a folder by name, date, etc.
I also tried to show him how to scroll with the mouse wheel, but he said it was too complicated, and he preferred to drag the scroll bar every single time.4 -
*dad's w10 computer running super slow*
*checks task manager*
100% disk usage
*checks whatever-the-advanced-system-monitor-is-called*
*Compattelrunner.exe is at the top of the list in disk usage*
*searches online to find what the hell that is*
"Compattelrunner.exe collects program telemetry information if opted in to the Microsoft EatASackOfDicks Customer Experience Fuckup"
Telemetry is supposed to be disabled on this computer.
What the fuck Microsoft, if you want to straight out lie to my face as a customer at least try to not be so obvious that you basically lock down my computer with your telemetry shit.3 -
I have a whatsapp group with my friends, none of which are techies. A while ago one of them was looking for a phone to buy, so he started looking at models, specs and all that, but got pretty confused and asked a pretty well-informed question to the group:
"Guys, what is that quad core thing?
And what is a RAM? Is it something like the processor of the phone or what? "
OK, pretty typical stuff up until this point. The guy knows nothing about this sort of things, I wouldn't criticize him or insult him or anything like that. No, that's not the problem. The problem is the person that responded to him. This... This melted my brain so much I will never forget:
"Don't worry about that, you only have to look at how many gigahertz does the processor run at. Don't worry about the number of cores or ram. The GHz are the result of the amount of ram and cores, so the more the gigahertz, the better the phone."
PD: "Also take a look at how many megapixels does the camera have if you want to take photos".
Some people just talk out of their ass and pretend like they're experts on any topic they've read about for 5 minutes on the Internet7 -
A few months ago I was working on a (totally underpaid project) where my friend and I had to basically rewrite the entire program our client was using.
So we started planning and wrote all sorts of documentation to show the client our ideas for the new flow of the program, the new structure of the GUI and a few more details of what would the inner workings of the new app. He seemed to like all those ideas and gave us the green light to go through with the project and start coding.
We spent a couple of months coding, redoing the front end from scratch (with a different framework even, so I couldn't reuse any code from the old version) and completely redesigning the back end so it would be better, faster, more scalable etc etc etc. During this process, we obviously showed the progress of the app to our client, explaining everything we had been doing, and he seemed to like every new version we showed him.
When we were in one of the last stages in development (basically sending versions of the app to the client for evaluation), the guy suddenly changed his mind. After agreeing on everything we had been showing him over the last months, he sent an email saying:
"...the new system makes the app too complicated. I want this program to be as simple to use as possible; so we should revert the "Policy" system to essentially what it was in the last major version. The only change I want to make is [...] and everything else is essentially the same as the last Policy system."
So basically he wanted us to FUCKING UNDO EVERYTHING WE HAD DONE AND REVERT THE FUCKING PROGRAM TO THE FUCKING VERSION HE HAD BEFORE HIRING US!!!! WHAT THE FUCK????
YOU WANTED US TO CHANGE YOUR APP AND THEN YOU SUDDENLY CHANGE YOUR MIND AFTER 3 FUCKING MONTHS WHEN THE PROCESS IS DONE???
GO FIND A SWORDFISH TO FUCK YOU IN THE ASS, IM NOT WORKING FOR YOU ANYMORE
God, it feels good to let that out.4 -
We have a ver crappy Internet connection at my office (I believe it's 100Mb/s for 50 people to share), so when somebody starts downloading a big file they pretty much hijack all the available bandwidth and fuck up everybody else.
Now, we have ONE, just ONE SINGLE FUCKING COMPUTER RUNNING FUCKING WINDOWS 10 AND EVERY WEEK IT FUCKS UP THE ENTIRE OFFICE'S INTERNET CONNECTION WITH ITS STUPID FUCKING UNCANCELLABLE MANDATORY UPDATES.
FUCK YOU MICROSOFT.8 -
This happens quite often in the trains of my city. I still wanted to know what the next stop was, btw3
-
One of my coworkers just had a baby, so he left work today and won't be back for a month or more.
We (accidentally) took the client's website down for 3 hours, messed up our git repo and when we finally fixed both things, I had to spend the rest of the day editing fucking vector graphics (which I had never done before and completely suck at).
I never realized how much work this guy does or how important he is until now.14 -
I have been learning how to dockerize entire projects this week, and I have to say, Docker is the best thing I've come across in a long time.
That is all5 -
In my country, almost every college student is expected to finish their degree and apply for an internship, with some universities forcing them to do it and making it a requirement to finish their studies.
Now, this wouldn't be so bad if almost every internship employer in the country didn't expect you to work for free. Seriously, I can estimate 80% of the internships pay you NOTHING. WTF.
Fortunately this is not the case for CS, but every time I tell somebody I recently started an internship, they will ask me: "Oh, but they don't pay you anything, do they?". Of course they pay me! I wouldn't be going to an office every day for 4 hours to do someone else's work if they didn't!!
Why the fuck is it even legal to employ somebody and not pay them a cent, just because "it will look good on your resume"?? And why do people still accept this shit??
Is is like that on other countries as well?2 -
My dad has had an android phone for about 3 years now. He just learnt that the big circle at the bottom takes you to the home screen. I love my dad.2
-
I don't know if this brand is popular outside my country, so I thought you guys should know this is a thing10
-
Today I spent several hours arguing with a client. Why? Because she's seeing an error on her website, and no matter how many times I explain to her that she's the only one seeing a css misalignment that was fixed this morning, and that she should clear the browser's cache or just use a different one, she refuses to understand that it's not my fault and that the website that's in production is working just fine for her users.
FFS I tested the same thing on Firefox Chrome, chromium, edge and even fucking IE8 on as many OSs as I can, namely Windows 7, Windows 10, Debian, Ubuntu, Android and OSX.
WHY DO YOU KEEP BLAMING ME FOR YOUR BROWSERS CACHE. SHUT THE FUCK UP AND ACCEPT YOU WERE WRONG FOR THE FIRST TIME IN YOUR LIFE.
Uffff, that feels better.2 -
I finish sentences with semicolons.
I type 'exit' in whatsapp conversations when I'm done sending messages.
I tried to :wq from Google docs the other day.
And most importantly of all, coding got me into tech in general, made me switch to Linux, start a thousand personal projects at a time and is now the thing I dedicate most of my time to, both in and out of work. -
Hi Guys,
Has anyone used websockets in their projects?
Want to know what problem did it solved and what kind of project it was ?16 -
One of my coworkers calls Firefox "Google". Oddly enough she also uses Chrome but calls it "Chrome". I get confused every time she asks me to help her with her computer.1
-
Dad: Hey, how do I make a program work when it's not working?
Me: Guess what, I've looking for the answer to that exact same question for a while now, but I still haven't found it. I'll make sure to tell you when I do.
(Clarification: He's not a dev, he was actually talking about some 10 year old version of some program not launching in Windows 10) -
Guys, I need some advice.
A couple of weeks ago I finished my internship as a sys admin in this medium sized consulting company. When my "contract" was about to expire they offered me a real job doing the same thing I've been doing for the past few months, but I turned it down.
The reason why I did it was that I wasn't really happy with the job. I mean, the people were... fine, the management team was... fine, the actual work I needed to do was... fine. I think you get the idea. The problem was that I never really enjoyed it all that much, and even though I didn't hate it, I wasn't really happy with it, so I turned the offer down.
After giving it more thought and listening to what some of my friends and family members had to say, I started thinking that maybe it was a bad idea to do so. Many people have said to me that I'm making a mistake, that I shouldn't leave a job before I have a new one, and that I should take the offer, work there for a little while and then look for something else.
I always answer by saying that the job market in this field is much more simple, and that it's much easier to find a new job than in any other, but yet again, I'm not sure if I'm making a big mistake with this decision.
Thoughts?
PS: I'm 21, this would be my first job ever7 -
I’m working 2 jobs at the moment, putting 12+ hours/day, been doing for about 2 months and I’m already burned out;
I’m working for a big e-commerce agency which is about to get bigger, doing mostly outdated Frontend work (Magento) with no sign of raises/promotions/ real growth, since all clients are basically enterprise and only want “ol’ reliable” over innovative.
A lot of smart people, lot of knowledge, pay is fair.
The second job I’m doing (part-time) is for a smaller agency in the same sector, pay is a bit higher, closer time zone and an opportunity to work with newer technologies.
I need to make a decision on one of these two companies since I can’t possibly keep working all these hours.
Is there anything else I need to consider before making a decision?
As a Frontend developer I’m getting a bit tired of working with Magento and its outdated tools, but at the same time seems difficult to switch to something different since I haven’t really worked with anything else, I feel a little bit lost5 -
TL;DR: Have you ever been on a serious company where you have to DRAW a high fidelity mockup of the software in the design phase?
So I'm in my last year of college and I have a class called Interactive systems design, which is basically about usability and how to design the frontend of your app so it's intuitive, pretty and easy to use.
So we work in groups to design a project for the entire semester, following a long and tedious process of research and planning which includes writing absurdly long documents, doing interviews with potential users and more.
Now that we've done all of that, the teacher insists that we make paper mockups of our app before we do a digital one using Balsamiq or other programs. He wants the paper mockups to be "interactive", so we have to draw them and then record a video where someone "clicks" on the mockup with their fingers and another person moves the papers around to make it look like an actual app that's doing something.
The teacher still insists this is something almost every company does when designing a project, so it's very important that we learn to do this kind of stuff. He's kidding, right? Have you guys ever drawn a mockup of an app instead of using some mockup software?7 -
Always double check the code you're sending to the teacher after finishing a school project.
I once sent them an old version of the code that had useless comments and debug messages everywhere. Some of them "politely" pointed out the fact that I really hated the subject, that it was pointless and that the assignment was way overcomplicated for first year students.1 -
I was assigned to maintain a legacy project today. I downloaded the source code, configured the database server and imported the project in visual Studio. For a tiny, blissful fraction of a second, I expected everything to work on the first try.6
-
I had to contact my ISP's tech support because I suddenly lost my Internet connection. I explained to the guy who answered that my router was working fine, and that my devices could connect to my WiFi network, but they didn't have Internet access.
He was so confused because he didn't understand that WiFi and the Internet are not the same thing. He then made me reboot my router and reset my configuration (like I hadn't done that before) and eventually ran out of ideas and scheduled a technician to visit my house next week. What a moron -
(a bit late for wk73 but I wanted to post this anyway)
Back in my first year of university, we had to write a relatively simple (though it looked super complicated back then) C++ console application. I don't know what it's called, but it's that game where the computer generates a random 4 digit code and you have to try to guess what it is. Every time you try, it will tell you which digits are correct, which would be correct if they were in a different position and which are outright wrong.
Anyway, the program had a main menu with a help option that would output a short guide on how to play the game. Instead of hard coding it into the source code, the "guide" had go be written in a separate text file and then read and dumped to the screen when necessary.
Here came my great idea on how to read files. Instead of looping through the file until I reached the end, I counted the number of lines my text file had and wrote some gem of a piece of code like this:
for (int i = 0; i<11; i++){
line = file.readline();
cout << line << endl;
}
My teacher obviously took points off for doing such a stupid thing, and I remember complaining A LOT about it. I argued that 11 was a constant because I didn't plan on changing the text file, and that the teacher had no right to take points off for only reading 11 lines because the file only had 11 lines, so it was read in full.
Goddammit, what an innocent little brat I was. I'm glad my first programming teachers were good enough to stay firm and teach me how to do things the right way, even if it's the hard way. -
I am trying to extract data from the PubSub subscription and finally, once the data is extracted I want to do some transformation. Currently, it's in bytes format. I have tried multiple ways to extract the data in JSON format using custom schema it fails with an error
TypeError: __main__.MySchema() argument after ** must be a mapping, not str [while running 'Map to MySchema']
**readPubSub.py**
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
import json
import typing
class MySchema(typing.NamedTuple):
user_id:str
event_ts:str
create_ts:str
event_id:str
ifa:str
ifv:str
country:str
chip_balance:str
game:str
user_group:str
user_condition:str
device_type:str
device_model:str
user_name:str
fb_connect:bool
is_active_event:bool
event_payload:str
TOPIC_PATH = "projects/nectar-259905/topics/events"
def run(pubsub_topic):
options = PipelineOptions(
streaming=True
)
runner = 'DirectRunner'
print("I reached before pipeline")
with beam.Pipeline(runner, options=options) as pipeline:
message=(
pipeline
| "Read from Pub/Sub topic" >> beam.io.ReadFromPubSub(subscription='projects/triple-nectar-259905/subscriptions/bq_subscribe')#.with_output_types(bytes)
| 'UTF-8 bytes to string' >> beam.Map(lambda msg: msg.decode('utf-8'))
| 'Map to MySchema' >> beam.Map(lambda msg: MySchema(**msg)).with_output_types(MySchema)
| "Writing to console" >> beam.Map(print))
print("I reached after pipeline")
result = message.run()
result.wait_until_finish()
run(TOPIC_PATH)
If I use it directly below
message=(
pipeline
| "Read from Pub/Sub topic" >> beam.io.ReadFromPubSub(subscription='projects/triple-nectar-259905/subscriptions/bq_subscribe')#.with_output_types(bytes)
| 'UTF-8 bytes to string' >> beam.Map(lambda msg: msg.decode('utf-8'))
| "Writing to console" >> beam.Map(print))
I get output as
{
'user_id': '102105290400258488',
'event_ts': '2021-05-29 20:42:52.283 UTC',
'event_id': 'Game_Request_Declined',
'ifa': '6090a6c7-4422-49b5-8757-ccfdbad',
'ifv': '3fc6eb8b4d0cf096c47e2252f41',
'country': 'US',
'chip_balance': '9140',
'game': 'gru',
'user_group': '[1, 36, 529702]',
'user_condition': '[1, 36]',
'device_type': 'phone',
'device_model': 'TCL 5007Z',
'user_name': 'Minnie',
'fb_connect': True,
'event_payload': '{"competition_type":"normal","game_started_from":"result_flow_rematch","variant":"target"}',
'is_active_event': True
}
{
'user_id': '102105290400258488',
'event_ts': '2021-05-29 20:54:38.297 UTC',
'event_id': 'Decline_Game_Request',
'ifa': '6090a6c7-4422-49b5-8757-ccfdbad',
'ifv': '3fc6eb8b4d0cf096c47e2252f41',
'country': 'US',
'chip_balance': '9905',
'game': 'gru',
'user_group': '[1, 36, 529702]',
'user_condition': '[1, 36]',
'device_type': 'phone',
'device_model': 'TCL 5007Z',
'user_name': 'Minnie',
'fb_connect': True,
'event_payload': '{"competition_type":"normal","game_started_from":"result_flow_rematch","variant":"target"}',
'is_active_event': True
}
Please let me know if I m doing something wrong while parsing the data to JSON. Also, I am looking for examples to do data masking and run some SQL within Apache Beam4