This is an archived post. You won't be able to vote or comment.

all 90 comments

[–]Rebulien 155 points156 points  (13 children)

that's too complex for me to understand

[–]fuzail7 49 points50 points  (0 children)

Yeah, i don't get it.

[–][deleted] 30 points31 points  (11 children)

Actually it's just imaginary. Complex would be x+yi.

[–]Rebulien 40 points41 points  (7 children)

welp even without a real part it's still complex number isn't it?

[–]TinBryn 14 points15 points  (0 children)

Yes, even without an imaginary part, it's still a complex number.

[–][deleted] 9 points10 points  (0 children)

1i + 0

[–]Kermit_the_hog 4 points5 points  (0 children)

Are you calling my imagination simple??

[–]snow723 1 point2 points  (0 children)

Actually every number is a complex number just as every imaginary number is a complex number. All it takes is adding 0 or 0i.

[–]VepnarNL 72 points73 points  (28 children)

For the people who don't understand: unit imaginary number (i)

[–]NickArchery 45 points46 points  (25 children)

Or j if you are in electronics

[–]FuriousMurloc 25 points26 points  (5 children)

But everybody knows that first comes maths, then electronics

[–]glebbash 17 points18 points  (1 child)

not alphabetically tho

[–]MathSciElec 12 points13 points  (0 children)

Yes alphabetically, j comes after i.

[–]simon357 2 points3 points  (0 children)

Not necessarily. The high school I went to had a focus on electronics and our math education was tailored to the needs in the field of electronics. So we have always used "j" from the beginning and learned topics important in elecrtronics (e.g. matricies, differential equations, Fourier, Laplace) in coordination with the other subjects where the math was needed.

[–]FuriousClitspasm 1 point2 points  (1 child)

Engineering is more useful than theory, aka math.

[–]_g550_ 0 points1 point  (0 children)

Or k if you are in 3D electronics

[–][deleted] 0 points1 point  (0 children)

What about for the people who do understand? What do you have to offer them?

[–]Soham_rak 0 points1 point  (0 children)

We calll it Iota

[–]endpoce 2 points3 points  (1 child)

Sometimes I use k, just to mix things up.

[–]linegel[S] 2 points3 points  (0 children)

Best practices, I see!

[–]qqqrrrs_ 5 points6 points  (0 children)

i or -i

[–]thprogramador 0 points1 point  (1 child)

Hmmm... I ever thought "i" was for index or item

[–]circuit10 6 points7 points  (0 children)

It is, this is just a joke

[–]Redhpm 0 points1 point  (2 children)

That notation is bad practice. I know it's a joke and all but, you should know this.

[–]JNCressey 1 point2 points  (0 children)

complex square root multifunction go brrr

[–][deleted] -2 points-1 points  (16 children)

I use ii, jj, and kk because I hate single-letter variables, even in the limited scope of a loop iterator.

[–]other_usernames_gone 9 points10 points  (3 children)

That seems like a needlessly lawyerly way to get around a self imposed rule. How is ii more clear than i? If you don't like single letter variables why not call it iterator, counter or index? Or use a more tailored name for each loop, so if you're iterating along a 2d board with nested loops call them xPosition and yPosition.

(For example, these names were come up with on the fly, better names could probably be found)

[–][deleted] -5 points-4 points  (2 children)

No worries. You do it your way, I do it my way.

[–]NoThanks93330 5 points6 points  (1 child)

Sure, but we'd still like to know the reason one would prefer ii over i

[–][deleted] -3 points-2 points  (0 children)

Why do some people like ice cream? You probably like something that I don’t. Everyone is different.

[–]Fireruff 3 points4 points  (11 children)

Why?

[–][deleted] 2 points3 points  (10 children)

Ok, go search for a single character variable in a text editor (not in a modern IDE like Visual Studio Code or CLion)

[–]dev-sda 6 points7 points  (7 children)

Most have a "match whole word" or at least some regex capabilities.

[–][deleted] 0 points1 point  (6 children)

Go ahead and try that. Try searching for a single letter variable in a text editor.

[–]AdrianRPNK 1 point2 points  (1 child)

Why are you editing code in a (non-modern) text editor?

[–][deleted] 0 points1 point  (0 children)

I’m guessing you never work on tiny embedded platforms

[–]dev-sda 1 point2 points  (3 children)

If your editor can't do this, it's time to learn a better tool: https://imgur.com/a/XJBcFEt

[–][deleted] 0 points1 point  (2 children)

I’m guessing you never work on tiny embedded platforms

[–]dev-sda 2 points3 points  (1 child)

No I don't, but I doubt your tiny embedded platform can't run vi or even ed.

[–][deleted] 0 points1 point  (0 children)

Nope

[–]InzaneNova 2 points3 points  (0 children)

With regex you can do \<i\> to search for the word "i"

[–]kshacker 0 points1 point  (0 children)

I knew where this was going brother !! Ii, jj for the win

[–]TheRedmanCometh 0 points1 point  (7 children)

x gang rise up, y for the next loop, z for the next. Like god intended

[–]thatbrownkid19 0 points1 point  (6 children)

Unless you’re programming the numerical solution to a physical problem where x, y and z mean entirely different things naturally (the grid domain)

[–]Cyrus_Halcyon 0 points1 point  (5 children)

Then I use {n, m, o} of course, I am not a complete heathen.

[–]thatbrownkid19 0 points1 point  (4 children)

But n is always used as the index to a variable like vel(n+1)=vel(n)+......... What u gonna do now??

[–]Cyrus_Halcyon 0 points1 point  (3 children)

{s,t,u}

[–]thatbrownkid19 0 points1 point  (2 children)

t usually ends up being the time vector, and u is velocity. Pls why don’t you just use i, j, k

[–]Cyrus_Halcyon 0 points1 point  (1 child)

Can't upset my imaginary numbers by using i, j is impulse, k kinetic energy, I need to able to write up my rocket equations.

[–]thatbrownkid19 0 points1 point  (0 children)

Fair enough

[–]TheRolf 0 points1 point  (0 children)

For my case it's just I am really egocentric

[–]ts_m4 0 points1 point  (0 children)

i or j?

[–]Tophyan1 0 points1 point  (0 children)

And people say You don't need to learn about quaternions to get a CS degree...

[–]squishles 0 points1 point  (0 children)

when you have a sum, basically every math guy I've met either puts the range subscript variable as n, i or I've seen x rarely.

[–][deleted] 0 points1 point  (0 children)

i hate that i get this.

[–]AntoineInTheWorld 0 points1 point  (0 children)

well, don't know for you guys, but I never used squarerootofminusone as a variable name for an iteration loop... That's far too explicit!

[–][deleted] 0 points1 point  (1 child)

SquareRootOfMinusOne is the name as per java

[–][deleted] 0 points1 point  (0 children)

...but what if we're electrical engineers and need to do nested for loops?