I bought some capacitors and they are very tiny. I also bought some transistors, 2N3904 If I remember correctly, and they are a lot smaller than I was expecting. It's not entirely a bad thing, but might be troublesome maybe when using them on a breadboard? I used these transistors in class and they were bigger. How do I know what their actually size is prior to purchasing?
Depends where you buy them from, but most online stores will either provide component specifications and/or datasheet which will contain the physical dimensions of the component package, pin pitch etc.
Check the "package" or "outline" field in the part description, and cross-reference to the mechanical drawing for that outline from the manufacturer. For instance, a 2N3904 is sold in TO-92 package, a thru-hole (when used as designed) package about 5mm square.
What did you purchase?
2N3904 is a JEDEC designation, where the spec includes the package, and limits on the electrical characteristics. Manufacturers usually provide additional data (typical data, tighter ranges, graphs) as well.
If what you got is anything but a normal body TO-92, you didn't buy a 2N3904.
There's no such thing as an "SMT 2N3904" for instance, but there does happen to be the widely available MMBT3904 with identical electrical characteristics. Some other popular numbers may be repeated in this way (MPSH10 / MMBTH10, TIP31C / MJD31C, etc.), but it's not a system, and coincidences abound.
Not that it's a big deal, as there are a hundred kinds of general purpose transistor with largely overlapping specs (from the ancient 2N2222 to '3904, 2N5088, 2SC1815, BC847, etc...), and the main thing you're buying is package and pinout.
Tim
I bought some capacitors and they are very tiny. I also bought some transistors, 2N3904 If I remember correctly, and they are a lot smaller than I was expecting. It's not entirely a bad thing, but might be troublesome maybe when using them on a breadboard? I used these transistors in class and they were bigger. How do I know what their actually size is prior to purchasing?
I bet you ordered from eBay, Aliexpress, or Amazon. I did the same thing.
Electronics suppliers such as Mouser, DigiKey, etc. provide datasheets for components. These typically include a mechanical drawing of the part with lots of dimensions.
They are trying to sell "sweepings from the floor" of a Chinese manufacturer and they do not know what they are. Most of them might not work.
I guess i'll only buy from mouser or digikey them.
It depends if you need specific dimensions, characteristics, provenance, etc. As with most things, if specifics are important, get it from a reputable source. If it's just tinkering, other places may be just fine. For example, I buy a lot of components from Mouser and DigiKey when I repair or refurbish equipment because I want the spacing and characteristics to be right.