Details
Joined devRant on 3/1/2018
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
-
So, just to recap if you missed the last few episodes. I've been a web developer for years. But I decided to get a degree and go to uni.
Also I am firmly on the fewer comments side of the debate about self-documenting code. Even though I usually rephrase it and say method and variable names are comments. Basic idea: something is unclear, you should leave a comment. But, before you leave a comment, take a good look at your method. Can you rename a variable? Maybe the method name? Maybe extract a method into smaller methods so it doesn't need a comment? And only if you fail to do so, leave a comment.
Alright, now that we rehashed that, uni coding makes no bloody sense.
There is code that is abbreviated to the max (or min).
And then, they need everything commented. I mean, why do that? Why call the parameters a and b instead of base and exponent. And then say:
"But write a whole article about it above the method". Like:
a is the base for a power operation.
b is the exponent for a power operation.
return int representing a to the power of b
How about just do this:
public static int power(int base, int exponent).
How is this not the same documentation?
Is it because we're at a uni, a place for smart people and smart people shouldn't have an issue keeping a mental map between the variables and their meaning?
Or is it because they are all mathematicians. All respect to applied mathematics. I mean, the function about exponent calculation, I was not aware that it could be that effective. But on the other hand, keep mathematicians away from programming. I get it, writing maths per hand doesn't have intellisense and therefore you don't want to write long variable names. It's and old tradition. Yada yada, yah.
But programming is not maths. And maths shouldn't be maths like that. Right naming makes it simpler. It might still be a while until we all LaTeX rather than handwrite and be able to give maths right naming schemes, but programming is beyond the point. Calling the array you handing in a function A and the one that you're returning D makes no fucking sense.4 -
I noticed something...
I drink a lot of coffee. I also drink tea. But usually when I want something sweet. So, lots of sweetener.
Sometimes I go and make me a cup of coffee and a cup of tea at the same time. And then, then it happens.
When I want to sip from my cup of tea and I reach for my tea, everything is fine. Same goes when I want a sip of coffee.
But woe me when I want a sip of tea and accidentally take a sip of coffee. You see, it's not the rapid switching between coffee and tea, it's the expectation of taking a sip of sweet tea and getting bitter black coffee. Suddenly coffee is the most disgusting thing I've ever drunken.
But give me half a minute and then I drink a sip of coffee on purpose and I like it again.
Yet, while I don't expect coffee, I feel like a ten year old who stole a sip of coffee from his parents' mug.
So I surmise, my frontal lobe has detected coffee as something good and must override the fact that I don't like the taste or something like that. But to do so it must anticipate coffee. Anyone willing to experiment with that to figure out if that's normal or if I am just weird?18 -
Really minor gripe, but how comes that on a new install of Regolith ping is not installed but mtr is?
I think it's not limited to Regolith... But that's weird, isn't it? -
My cat is powerless.
I am perfectly capable to operate my computer with my keyboard only. I am perfectly capable to operate most of it with my mouse only.
But my cat can only block one or the other.
Got two cats, though. Hope they won't team up against me.15 -
In a continuation of my previous rant:
Alright KVM is running.
First devrant post from my Windows inside my Linux with dedicated pass-through graphics card. So far, looks like it's working.
Installing Horizon Zero Dawn to gage gaming performance. But it looks promising. With a stylish button on desk that switches between Windows and Linux.2 -
I am so tired of Windows.
Latest story. I am doing homework for uni. I write it in LaTeX.
My LaTeX editor is vscode. Because there are great LaTeX plugins which can use a docker container for LaTeX. Also vscode has a vim plugin.
I wanted to synchronize my progress, so I installed GDrive Sync and pointed it to my homework directory.
And suddenly compiling regularly crashes. And it's Windows fault.
This is how the plugin uses LaTeX: "First creating some auxiliary files. Then create the pdf. Then delete the auxiliary files.
But sometimes it happens that GDrive finds the auxiliary files. Then it will open the file in readmode. And upload the contents. And here's the problem. When it's opened, it cannot be deleted. This crashes the pluging. Could have been programmed better, but hey, in Linux, it could be deleted.
Files in Linux are garbage collected. Well, not really, but same effect. When a file is deleted, it disappears immediately, but is actually only deleted when no more process has it opened. Meaning, you could delete something that is being uploaded. It would be continued to be uploaded until GDrive is done, at which point the file is deleted. GDrive would see the change and delete the auxiliary file remotely.
So, it is inherently better at throwing multiple applications together without them conflicting with each other.
Yesterday, I was finally fed up with all of that and installed regolith on my system. But I am worried. I don't know what my uni will throw at me. Stuff like zoom breakout session. There is no guarantee that not someone needs something done that's only possible in Windows (or only possible with reasonable effort in Windows). And if it's just turning in an assignment as a power point presentation.
Plus I want to game. And I have more than just steam games.
Well, anyway. Today is the day where my KVM-switch and second graphics card arrives. Think I have that covered.
Also gives me the opportunity to spin up a separate windows for applications I don't trust.
So, I guess my setup just made a huge leap to a better state.7 -
Expectation.
Separate theoretical computer science from practical computer science.
Honestly, create a new speciality, the computer mathematician. Fill it with theoretical computer science, algorithmic and applied mathematics. So, the core of a pure computer science curriculum.
People wouldn't be surprised about what they get.
And then you can have some more application creating speciality. I mean, we already have those. And they advertise themselves quite right. But pure computer science does not.3 -
I should be happy that I am bored, but I am bored, not happy. Paradox of understanding at the university.2
-
It's great. I'm constantly talking to customers at the moment, because I quit my job and became a student and a freelancer. I love to see them gulp when I finally name my price and some give me work. And I make in twenty hours what I made in a month before.
That's because I'm expensive now but have been dreadfully underpaid before -
First day of uni. Quit my job as a developer to become a computer science student.
So many people told me that makes no sense and they're right financially. But I want to.
One day down, 7 more years to go. Old man's learning again.18 -
Just thought about fizzbuzz and how while being dear simple, there is no good solution to it.
And then I thought there must be s library for it. And yes, there is: https://pypi.org/project/...
I was never asked on an interview to write FizzBuzz, but if I will, I'll try to use the library and see the look on their faces.21 -
I finally have a pair of Bluetooth headsets that fit perfectly in my ears. A cheap knock-off of Apple Earpods.
And they are so amazingly comfortable and hold perfectly in my ear. Just like it is supposed to be.
They became my main headset. Doesn't matter if on my phone or my laptop.
Now, when I stand up from my computer, I always have to do this litter dance. It mostly goes like this:
Step 1: Lock my screen
Step 2: Pull out my phone
Step 3: Realising I have forgotten to end the Bluetooth connection with my Laptop
Step 4: Curse bloody murder, because it's surely the ravens' fault
Step 5: Unlock my screen.
Step 6: Open config and disconnect my headset
Step 7: Lock screen again
Step 8: Connect my phone
It's such an annoyance. Why does Bluetooth not support force connecting with a previously connected device? Next vacation, I will write an application that allows me to remotely disconnect and connect to Bluetooth devices.4 -
Why are all of my Bluetooth headsets saying: "Your device is disconnect?"
When I connect them, they use the grammatically correct phrase: "Your device is connected."
But on disconnects it says "disconnect" instead of "disconnected." Different headsets from different manufacturers and all of them are doing that on different devices.
Is there something in the Bluetooth specs that requires that grammar error, similar to the orthographic mistake in the referrer header?10 -
My private lappy is ageing.
Funny things about modern computers, it's hardly noticeable. At least in performance. SSD makes it start fast. And as long as I am not playing any games, I can do everything just as quickly.
But then, there is the keyboard. Some keys getting annoyingly unresponsive. Need to open those keys up. Oh, and yesterday when I unplugged a USB connector, part of the plastic around the port broke away.
But there is one thing I cannot fix. The screen resolution. It's a 1366x768. And so many applications already don't show up completely. Or I have to scroll. Or they unnaturally pressed together.
i3 is a godsend to deal with screen limitations, but it cannot perform miracles. How did we use screens in the past? I mean, I know intellectually that in the past developers were developing applications on smaller screens, hence they were optimised for smaller screens, yet whenever a modal opens that is bigger than my screen I am kind of amazed this is a thing.
Cannot wait for my new XPS.7 -
Okay. Wow.
For years I was a society's Dum Dum. My fault, really. But I was.
But now, in my early 30ies, closer to mid 30ies, suddenly have me access to universities.
uopeople already accepted me, but suddenly so many others do so, too.
And suddenly I have choice. Too much choice. Computer science. Computer engineering. A bachelor program that is labelled "computer science, physics, mathematics".
And I don't know what to choose.
For years, I was resentful at the academic system that excluded me for reasons that I have to admit were my fault.
Now that I have the required funds and choice and a willingness to spend my next seven years, right into my 40ies in academia, I'm terrified that I chose the wrong thing and miss out on something.
I learned to deal with having no options, can't deal with having so many options.3 -
Okay, I am working on WebRTC. Which is cool. A really cool topic.
If I just were not under time pressure. I need to understand it, implement it, librarise, and school my coworkers on it.
And I just run out of time. This is how stress is born.3 -
Just looked through the man page for date and found this:
%M minute (00..59)
%S second (00..60)
Is that a mistake in the man? Or are they actually preparing for the leap second? But how? Leap seconds are not determined years ahead of time, so it needs constant updating?
I just assume the leap seconds are just ignored. Like, if we come across a leap second, I expected my computer's clock to be a second off and then next time we use NTP, it's just back. And that the timestamp is just without leap seconds. But is there actually somewhere on my computer a counter for how many leap seconds have happened?
Or maybe even a list, exactly detailing all leap seconds and the moments they happened?
I definitely need to look into this... Not now... Need to get back to work... But soon.4 -
WHY PHP?
I know another PHP bashing rant. But PHP became almost good. It is definitely usable now. But every other library or function throws an \Exception.
If I catch it, it completely fucks with my exception that I might want to catch further upstream and if I don't, well the bloody app might crash.
This is a PSA, throw specific exceptions in your libraries. That allows me to write clean code that is interrupted by an exception instead of having return types like this "int|false" and code like this: if (!$this-addToDatabase($value)) return false;5 -
Don't want to read my emails. Because they are too many. Won't read them tomorrow either, because they are even more.13
-
Sometimes there are moments when you feel like having a superpower as a coder.
Had to work with this shitty website. Completely not designed for vertical screens. Scrum board. When using it on a vertical screen, you would have to scroll down for ages to find the last few columns down there.
Quickly opened the web editor. Added display flex and flex-direction row. Looks better. Great. New grease monkey script. Added those commands. It is completely nice to work with this website now. Time investment? Less than 10 minutes.
Sometimes, just sometimes, being a coder is magic and I wonder how normal people are using the internet.2 -
Working the first time with a screen turned by 90 degrees. It was a necessity because it was the only way it fit comfortably on my table next to my two other screens.
But, it's so amazing for reading documentation and for having long terminal outputs. Even if I had enough space, I'd keep it.3 -
Anti Windows your project by doing this:
touch antiwin antiWin "windows?"
echo "take that Windows" >> con
I have not tried it, but I wonder what would happen on git pull.9 -
There must have been a person, a developer, probably in the 80th, that came up with the idea that reflection can read comments, so he can add annotations or if statements in comments.
I don't say we should shoot him.
But we should think about a terminator and a time travel program.3 -
Robert C. Martin. Clean code philosophy changed everything.
Reading code ala Uncle Bob is like a binary search to the place in the code you want to work on.4 -
I am just modifying code I wrote not too long ago. And it becomes a mess. But I know from business, I don't have time to refactor.
I start to really appreciate the open/close principle. But I don't have time to follow it.
Well... That's how it happens. I do it. I know. I really can't do anything against it.2 -
Support for an app that long handed over. This time, a customer is supposed to be deleted. The client probably wants me to delete the customer from the live database.
Why can't he delete the customer himself? Well, the button is disabled. And apparently, he doesn't want to pay for my time to figure out why the button is disabled. Or that's normal, who knows. I don't know the app.
I open up the database. Try to generate a model of all connected tables to the customer table. No luck. The tables aren't connected, the ORM handles relations. I hate that. Probably have to go through and delete all of those manually in a live database. Argh!
Okay, let's see why we cannot just click the button. Alright, yeah, there is a disabled on the button. Hmm... I wonder. Removed the disabled in the web browser inspector and hit the button. Seconds later, the entry disappears from the database.
My predecessors were sloppy. Probably thought it's the admin menu. We don't have to protect our customer from himself.
That just saved me a lot of time. -
The best thing that can happen to a dev?
A 2-hour meeting got cancelled. Yeah!
No backlog tomorrow!6 -
Microsoft servers just right now were the first servers giving me the full speed my connection can bear.
Downloading a Windows ISO in under a minute with a speed of up to 106MB per second, according to Firefox.
Microsoft, this is a first, but you gave me the biggest grin I had in a while.8