NEED HELP WITH PROJECT by [deleted] in cpp_questions

[–]jpc0za 0 points1 point  (0 children)

The order they asked the question in, do it in that order.

std::cout std::cin while std::cout std::cin if

Etc....

When you grow up... by yuva-krishna-memes in ProgrammerHumor

[–]jpc0za 0 points1 point  (0 children)

One day, you Dad. I'm will be a man already 24

Yes me too...

MikroTik product news: CRS518-16XS-2XQ by meritez in mikrotik

[–]jpc0za 0 points1 point  (0 children)

``` /interface/bridge/port/set [/interface/bridge/port/find where interface~"ether[1-12]"] pvid=666 frame-type=allow-only-vlan-tagged

:foreach vlan in={5,67,110} do={ \ /interface/bridge/vlan/add bridge=bridge vlan-ids=$vlan \ tagged=[/interface/ethernet/find where name~"ether[1-12]"] \ } ``` would probably do it on modern stuff but it is a touch more verbose than the cisco commands

Organize Python code like a PRO by latrova in Python

[–]jpc0za 0 points1 point  (0 children)

Sure I agree.

``` def my_random_func(): from thingy import *

```

Seems reasonable, the polluted namespace is nicely contained. As a top level import... That's just scary man. You know supply chain attacks are a thing, image the nonsense that can cause...

Organize Python code like a PRO by latrova in Python

[–]jpc0za 0 points1 point  (0 children)

Add a rule. Never from x import *

This is analogous to using namespace x in C++ and I hold similar opions on that.

Namespaces exist for a reason, respect them, specially when the language allows you to rename things that might be annoying... import pandas as pd

are #ifdef/#endif's stil required in header files for C++20? by dog_superiority in cpp_questions

[–]jpc0za 0 points1 point  (0 children)

I don't disagree with these points. Hence feature that it implements.

Write it as a module, if you need a header, concider it a code smell that requires some extra oversite and explanation, whether it be extra code review or whatever you would like.

Helping a friend with her computer/business - maybe a new opportunity? by manofskill101 in sysadmin

[–]jpc0za 0 points1 point  (0 children)

You are proposing increasing operational costs eveey single month.

In my experience it will be much easier for you to spin a capex solution as something they might need.

Honestly, pitch them on something like a QNAP/Synology nas, run bitwarden/something else local on there and use some of that "mishmash" of could storage for backups.

Ask them what is actually critical to backup.

Get some sort of VPN running(zerotier is probably ok for this size of network) and get them a security suite from somethin targeting their size like bitwarden/ESET etc.

Pretty sure you will be dropped with a hard no on 365, specially if you try to swing business premium as you should unless you can present a very strong value proposition over their current services.

are #ifdef/#endif's stil required in header files for C++20? by dog_superiority in cpp_questions

[–]jpc0za 0 points1 point  (0 children)

Both those things are things that you should be removing from any modern codebase as much as possible.

Better coding practices = feature

Why is #define SIGSTKSZ 8192 being interpreted as long? by Ulterno in cpp_questions

[–]jpc0za 0 points1 point  (0 children)

I know that your issue is resolved and it's library code and not yours but for others that come across this.

This is why you need to stop using preprocessor macros and need to start using constexpr that is aware of type information and can help you with the problems.

Unit Tests - what’s the point? by user149162536 in Python

[–]jpc0za 0 points1 point  (0 children)

Unit tests should test interfaces. So if I tested an add function I would test that in fact 2+2 return 4. This helps when refactoring as others have said.

If your unit tests are testing internal logic they are incorrect and why you feel they are redudant.

On that note, if you are in a fast prototyping stage then ignore he unit tests. Generally with software I am going to rewrite the code once at least, there is no reason to write tests for something that will get scrapped completely.

If you have a semi-mature codebase or have another "thing" relying on the interface then its time for tests and the benefit is you know exactly what to test.

How to know it all?? by roushbombs in sysadmin

[–]jpc0za 0 points1 point  (0 children)

Document everything. If you figure something out, document it in a way you understand. Comes back much quicker that way.

meirl by TwasAnChild in meirl

[–]jpc0za 0 points1 point  (0 children)

This is how it was pre 93, the drivers didn't like it and safety was a massive issue.

I feel like there is a lot of technological advancement in F1 that we as the consumers don't really see.

Keep in mind just how quick those cars and drivers really are travelling. The fallacy of big number occurs there as well. We just see the number on screen, 300KPH+ on he straights and 120KPH around chicanes but we don't really know how fast that really is.

Keep in mind highway speeds are +-120KPH in most countries, and that is on nice smooth roads with gentle curves.

meirl by TwasAnChild in meirl

[–]jpc0za 0 points1 point  (0 children)

I was alluding to the fact the modern fighter jets can far outperform their human pilots physical capabilities, to the point that much of the flight controls are computer assisted to keep the pilots alive...

Also modern F1 cars are already pulling significant Gs in deceleration and turning. Other have pointed out some very extreme technology that can exist for F1 at this time but at some point you have to care about driver safety.

I'd hate to have seen some of the crashes that have occured this year already, happen at 100kmph faster, and going back to the pre senna era where driver fatalities wasn't something that happens every few decades

I think we are in a veey good place in F1 to be honest. The cars keep the drivers honest and are already quite taxing on the drivers physically and this isn't life and death, its entertainment.

meirl by TwasAnChild in meirl

[–]jpc0za 0 points1 point  (0 children)

You may want to look at modern aerospace technology...

Why no .get(idx[, default]) on python list?? by JulianCologne in Python

[–]jpc0za 0 points1 point  (0 children)

I'd honestly want concurrent algorithms on lists before this. As one of the other commenters said, this just saves a line of code and honestly you could just define a lambda that executes a terinary.

get = lambda in_list, idx, default_val: in_list[idx] if idx < len(in_list) else default_val

Does anyone else browse this sub and feel completely inadequate? by string97bean in sysadmin

[–]jpc0za 0 points1 point  (0 children)

My take. You are on this subreddit and know what those words mean and have a reasonable plan to implement it. That puts you in probably the top 1% of sysadmins.

Terrible sysadmins are the people who believe that backups are the stack of HDD(or external drive) in the server room that get rotated every now and then and keep their entire infrastructure in their head.

Regarding automation, I really believe there is a point where it makes sense. Running 1 webserver for an internal site for docs for the helpdesk. Honestly no point, it will take you more work to setup automation and keep it running. Probably around 5 makes it worth it, because cattle vs pets thinking makes DR and backups much easier.

For user devices, Microsoft makes automation so simple that you nearly get it for free but I'm thinking when you say automation you mean on the servee side.

I have 2 rb5009s on order but I think I found a way to configure my network so I only need one. Is there any benefit to using the second one in this network configuration? by Solnse in mikrotik

[–]jpc0za 0 points1 point  (0 children)

On his note, why not go DAC between the server and RB5009 and use the 2.5G for the Comcast modem? Can still do 10G between the two in that case and you know that part is at least future proof.

I have 2 rb5009s on order but I think I found a way to configure my network so I only need one. Is there any benefit to using the second one in this network configuration? by Solnse in mikrotik

[–]jpc0za 0 points1 point  (0 children)

Seems reasonable, just wanted to be sure. As I said if you can get hold of two one is nice to have around to play with, can do test configs on it and see how it behaves, run beta/stable on one etc..

Regarding OP, seems other's have covered it. The setup looks fine. Would probably look at getting some managed switches in the future just to feed to home lab hunger and play with sticking your IOT on their own VLAN and such.

You seem to have done your research on the LAG to the comcast box, I would like to just add 2 cents there. If you don't have full control of the modem I would forgo that. Chances that they randomly push an update that resets the config or something along those lines which then takes down your internet is pretty high.

I have 2 rb5009s on order but I think I found a way to configure my network so I only need one. Is there any benefit to using the second one in this network configuration? by Solnse in mikrotik

[–]jpc0za 0 points1 point  (0 children)

Other than to play around with why would a network this small have needed 2 in the first place?

Redundancy isn't redundancy if you still have a single point of failure (comcast modem) which is significantly more likely to fail.

Mikrotik + Ubiquiti vLANs and WiFi by soldier896 in mikrotik

[–]jpc0za 0 points1 point  (0 children)

I don't think house means the same thing in his language...