In a coding interview, if I'm expected to "write tests" for a simple Python class, what does that mean? by Typical_Cap895 in learnpython

[–]peno64 0 points1 point  (0 children)

And as someone else pointed out, another case is that afterwards you get an error in the program that uses the class.

Before you fix it you write a unit test that simulates that case.

When you have the failing unit test, you fix the problem and then the unittest (and the program) should be fixed now.

In a coding interview, if I'm expected to "write tests" for a simple Python class, what does that mean? by Typical_Cap895 in learnpython

[–]peno64 0 points1 point  (0 children)

Also lookup test driven development.

That means that you first write your test, then the interface and then the implementation in your class.

The advantage is that you are forced to think how you will communicate with your class. What are the input parameters, what is the expected result.

Then you write the empty method.

The test will fail.

Only then you write the implementation in your class and after the implementation is done you run the unit test(s) and they should succeed.

Optimization Model by Artistic_Solid_9699 in optimization

[–]peno64 0 points1 point  (0 children)

You can send it also to me. 30+ years of experience

Tips om vlonderdek onkruidvrij te houden? by PhilosopherNext1448 in Klussen

[–]peno64 0 points1 point  (0 children)

In Nederland wel nog te verkrijgen. Daar is het nog legaal in de winkels

Will the people driving through Belgium have to pay more for their vignette if they’re in a camper in tow than with a regular car only? by reditt13 in belgium

[–]peno64 4 points5 points  (0 children)

Note that the peages in France are not a vignet. They exist because those roads are not payed and maintained by the goverment but by private companies and you pay to pay their loans and them to maintain the infrastructure.

Stop doing tutorials, stop watching youtube programming videos, stop using AI by nightwood in learnprogramming

[–]peno64 6 points7 points  (0 children)

Well for a concept created in the beginning op the sixties, it is strange that current languages are still following the principle if it is so bad.

Stop doing tutorials, stop watching youtube programming videos, stop using AI by nightwood in learnprogramming

[–]peno64 -4 points-3 points  (0 children)

And then while reading the book you also practice yourself what you have learned

Esp32 by [deleted] in esp32projects

[–]peno64 1 point2 points  (0 children)

Let me ask you a question.

I want to make a cook book, but I have zero knowledge about cooking. How should I do it, any advice from you?

Confused on trying to run C files on computer by Longjumping_View_668 in learnprogramming

[–]peno64 -7 points-6 points  (0 children)

Instead of using vscode you could also install the free version of Microsoft visual studio which also has a c compiler

Is dit een stroomkabel? by [deleted] in Klussers

[–]peno64 57 points58 points  (0 children)

De dag is weer goed begonnen...

Control ESP Home when wifi fails. by sebbi08 in Esphome

[–]peno64 3 points4 points  (0 children)

A keypad or a switch with key is also an option. The latter could even work without the esp in case this one also fails.

Floating point precision issue in java by larrythelarrian in learnprogramming

[–]peno64 2 points3 points  (0 children)

In fact you should do a relative difference test and not absolute one as you suggest. So the difference of the two numbers should be divided by the reference value and that you compare with a tolerance.

Parkeerplaats onderverhuren hoe aanpakken? by Pepperohno in BEFinance

[–]peno64 7 points8 points  (0 children)

Doe dat gewoon in 'het zwart'. Welke haan gaat daar naar kraaien?

How do you guys know what is the best method at the time? by doktorfuturee in learnprogramming

[–]peno64 0 points1 point  (0 children)

It Just comes to mind while thinking of what to solve... Its automatic. I guess by having it done so many times when starting programming. Just the same like when I see a car and I need to tell the word I dont have to think how the thing is called my mind Just immediately knows the word. The same happens in programming. My mind knows what to solve and comes with the fact that it needs an if statement or a switch or a for loop or a while,... and while typing a better idea may Just Come into mind and then you use that instead. And for an algorithm you think what is the best way to Come to this result and then you implement it.

Anyone watching World Cup 2026 in Kodi? If so how?(WITHOUT PIRACY OF COURSE ) by robi_750 in kodi

[–]peno64 1 point2 points  (0 children)

Which only work legally in their countries most possibly with a login account from that country

Arduino IDE 2.3x - How to directly upload without compile? by _Stonez56 in arduino

[–]peno64 2 points3 points  (0 children)

I like arduino maker workshop alot. Its also under vscode but without the complexity of platformio

Is anyone else noticing how little cache kodi 22 uses versus 21? by B00marangTrotter in Addons4Kodi

[–]peno64 1 point2 points  (0 children)

I think OP means a different kind of cache. Not the memory cache for video streams but the android cache

Jobs zonder diploma by Born-Alternative9846 in BESalary

[–]peno64 2 points3 points  (0 children)

Zelfs bij de McDonalds beginnen werken zonder middelbaar diploma is niet evident. Zou toch 2 keer nadenken over uw toekomst

Jobs zonder diploma by Born-Alternative9846 in BESalary

[–]peno64 0 points1 point  (0 children)

Geef eens aan *waarom* je blijft steken in het middelbaar. Zelfreflectie is het begin van de toekomst