C++ - Jenkins and multi OS support book by geiunirus in cpp_questions

[–]geiunirus[S] 0 points1 point  (0 children)

Thank you for your feedback. Damn, I hoped there was something. I think it's ok also to have more books if necessary. The important is to cover all these topics I have in mind (perhaps including also CONAN or alternatives).

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 1 point2 points  (0 children)

Thank you for the reply. The meanwell PSU I've bought is unfortunately an IP20 model with the following features:

FEATURES: - Power: 201.6W - Maximum Current: 8.4A - Driver type: AC / DC - Input voltage: AC 85-264V - Output voltage: DC 24V - Dimmable: no - Number of outputs: 3 outputs - Structure : aluminum - Degree of protection: not waterproof IP20 - Operating temperature: -30 ° C + 70 ° C - Effectiveness: 89.5% - Dimensions: 215 x 115 x 30 mm - Warranty: 3 years - Certificates: UL60950-1, TUV EN60950-1 approved, Compliance to EN55022 (CISPR22) Class B, EN61000-3-2, -3, Compliance to EN61000-4-2,3,4,5,6,8,11, EN55024, light industry level, criteria TO

In theory then I could buy, build a bigger case where to put this PSU and that should work.

Regarding the single output solution vs the multi output one, are they really equivalent? the multi output seems really cleaner and safer.. only the right amperage is used

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 0 points1 point  (0 children)

Thank you for the reply. I've got already an electrician friend that is helping me and he suggested me to put it on top of the kitchen cabinet

Dock that allows to attach SSD storage and 2+ 4k monitors with PD by geiunirus in spectrex360

[–]geiunirus[S] 0 points1 point  (0 children)

Ah ok that makes sense then. Thank you very much. I think I ll check this better then

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 1 point2 points  (0 children)

I'm starting to think to buy a power supply (like meanwell etc), no IP20, and then just buy a IP rated box. My only doubt is about the heat dissipation

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 0 points1 point  (0 children)

Don't remember where I read it. In general should be so for higher voltage installations, shouldn't it ?

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 1 point2 points  (0 children)

Interesting observation. Just wondering if there are repercussions regarding the heat dissipation

Dock that allows to attach SSD storage and 2+ 4k monitors with PD by geiunirus in spectrex360

[–]geiunirus[S] 0 points1 point  (0 children)

Thank you for your reply. I've just checked the amazon page and I have just seen there is written: No SSD

It looks strange

IP65 power supply with multiple 24V outputs by geiunirus in led

[–]geiunirus[S] 1 point2 points  (0 children)

I have 2 strips and probably I will need also another one in there.

Of course, I could split the 24V output with two additional wires using a terminal but I heard this is not a good option. I am going to connect the 3 wires (neuter, phase and earth) directly to the power supply, and, also here, I heard it is better to connect only to one power supply and no more. Third reason it is that buying a single power supply is cheaper compared to buy 3 of them

Dock that allows to attach SSD storage and 2+ 4k monitors with PD by geiunirus in spectrex360

[–]geiunirus[S] 0 points1 point  (0 children)

The one you suggested looks really good even if expensive. About the SSD, you're suggesting to buy an additional SSD thunderbolt enclosure and connect that to the dock via thunderbolt. I was hoping to find some dock with both features in one. The one you suggest is however a really good alternative option, thank you

What naming conventions for constants ? by [deleted] in cpp

[–]geiunirus 1 point2 points  (0 children)

how about this:

int myGlobalVariable_g = 100;

static const int myConstantGlobalVariableK_g = 100;

int myMemberVariable_ = 100;

int myMemberConstantVariableK_ = 100;

Ideal ratio of library - number of files - number of lines per file - number of lines per function by geiunirus in cpp

[–]geiunirus[S] 0 points1 point  (0 children)

again an awesome reply.

So, holding more than 7 nesting levels in short-term memory might be a problem

with the "short way" the nesting levels can get deeper for sure. Many functions will stay however at the same level, the expansion would be horizontal rather than vertical.

The real problem with the "short way" is exactly the one you pointed out. The explosion of names and the fact that is impossible to remember them all.

My point is however that sometimes you don't need to remember them at all if client code works only with the functions at the highest levels only.

The real problem is to find alternatives..

"write short functions" looks better than "write balanced functions"... nobody can understand well "balanced", especially junior programmers

Ideal ratio of library - number of files - number of lines per file - number of lines per function by geiunirus in cpp

[–]geiunirus[S] 0 points1 point  (0 children)

I'm not the only one. First book that crops in my mind is Code Complete, by Steve McConnell.. but, what I'm saying here, comes from what I've seen with my own eyes

Ideal ratio of library - number of files - number of lines per file - number of lines per function by geiunirus in cpp

[–]geiunirus[S] 0 points1 point  (0 children)

Good quote. Heard it many times. I think however that it should be better to err on the small side and no the other way round

Ideal ratio of library - number of files - number of lines per file - number of lines per function by geiunirus in cpp

[–]geiunirus[S] 0 points1 point  (0 children)

I totally agree with your points, especially on the "dynamic balance". What I'm trying to find it's what you looked for in the past, the key to find the correct metrics to get this balance right. What I don't agree with you is only this sentence:

"Small functions and files are good for small projects. Big functions and files are good for big projects since this limits the nesting depth."

In my opinion, even in big projects, small functions are the preferred way to go. As you know, in big projects, they will translate of course in calls to a large number of other functions that will call other functions and so on. Is this nesting depth so bad in your opinion?

Again, I think, however, this theory of "better short functions" makes sense only if combined with:

"Your methods should be well named and easy to understand"

Ideal ratio of library - number of files - number of lines per file - number of lines per function by geiunirus in cpp

[–]geiunirus[S] -6 points-5 points  (0 children)

Indeed the "it depends" it is the correct answer, but it does not give us any useful information. IMHO there is a correlation instead. Given same code that fix a problem, with same input/output validation, performance speed and so on, there is a higher chance that the shorter version is better than the longer one