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 realtime personalized recommendations and activity feeds using a simple API
Learn More
Search  "maths"

Honestly? I was always good at maths and creativity. And so, programming was natural to me. I was always good at it with minimum effort. ¯\_(ツ)_/¯
... Algorithms were a whole other story tho. I'm still not confident 'bout any algos I program from scratch. But hey, if it works, it works. (that became my motto about algos, kinda)
Forgot one thing tho: looking at relevant code to whatever I'm doing, be it in a tutorial or stackoverflow. I don't need the text or tutorial or explanation, I need to see code examples.2 
I woke up screaming today. I had a nightmare where I ran git pull on the project I work on every day, and it had become a .NET project.6

None, actually.
Tho I should thank Mr. S, calculus teacher in my last year of highschool, and most of my physics teachers, and that one lady in first year of highschool teaching maths. I think those were way more important in teaching me logic than the folks who pretended to teach me stuff later in uni.
Oh, and that dude, Sir O.D., who was my professor of embedded microcontrollers in uni. Didn't teach me much programming, rather taught a memorable lesson on VHDL and how hardware really works. 
Year 7 maths in 1984  the teacher had a computer and showed us some BASIC commands to do mathematics.
I was spellbound. That year my father also bought a Commodore 64 for the family and I gravitated towards it. I typed program listings out of magazines and learnt programming almost by osmosis.1 
One day I had a thought. (Dangerous, I know.) What if I could build a machine that took me up into the air and decoupled my inertia from the rotation of the Earth. So I would cease to move in sync with the Earth's rotation. Then I thought this could be a way to travel around the Earth. I wanted to know how long it would take to go around the Earth. So I got the circumference of the Earth and divided it by the surface speed of the Earth. I was really excited at this point.
40075 km ÷ 1670 km/hr = 23.997 hours
Oh ... yeah ... 24 hours. I guess the math checks out.
And this is why we need dev ducks.3 
I've just finished installing Ubuntu Unity 22.04 on a new SSD installed on my wife's computer; it's so relaxing the fresh air of a new Linux distribution installed.3

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 selfdocumenting 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'm mostly selftaught, but there are a couple people who defined my understanding of computing
 My amazing elementary school friend whose father worked at IBM and who initially turned my interest from astrophysics towards computing. I don't know whether physics would've been fruitful but I know computing is.
 My high school friend, who taught me the basics of OOP. Though we agree on almost nothing today, his explanations about code quality defined my understanding of the matter which I then used to draw completely different conclusions
 My high school mathematics teachers, who tolerated the way I abused every tool at my disposal to construct proofs that resembled a rollercoaster, and helped me develop my own understanding of mathematics
 3blue1brown for producing replayable videos in a similar quality to my high school maths lectures with additional stunning visuals. No content on the internet fits the way I think quite as much as that channel. 
I feel like the world, and my life has been so crazy lately that I needed something reassuring.
```ruby
def test_true_is_true
assert_equal true, true
end
```2 
I try not to distract myself with more pleasurable things until I've got everything done. For example, I don't watch YouTube between my tasks, don't keep checking my cellphone every time, play chess, etc.4

I had to explain lambda calculus to some maths majors so here's an interactive lambda shell:
https://lbfalvy.github.io/lambda
I still need explanations about Churchnumerals, conslists and the Y combinator.1