Understandable. I really enjoy low level stuff, like using C for embedded. I mean I love C in general. I guess for me it just depends on the context of when it's being applied as to which language I'd prefer.My last program on defense was writing a toolset that used a Java front end with a c++ (c with classes) backend. Its the first and only time I've written Java and while I see the appeal, it just never spoke to me. High level languages are just not in my wheelhouse, and also the gui stuff was frustrating.
Im a C/C++ expert at this point so I just prefer it. I've done uefi/bios/drivers and now radar control in it. Just real low level stuff
Forgot I had this joke primed at work.Guy that worked in my building chopped up.some chick this last weekend
Woman Kidnapped In Boston Found Dead, Suspect In Custody
I like Python mostly because it handles a lot of the annoying bullshit(but not unimportant!) with programming and lets you concentrate on algorithm design and data constructs. I started with C/C++/Java over the years and a lot of stuff didn't really click until I started my current job, where I first encountered the language. It could also be that this is the first real software job I've had, while every other job was hardware with software as kind of an afterthought. I might have had the same epiphany with the same setting but different language, who knows.
I prefer Python because I'm good at it. But I'm also not above realizing that there's usually a couple preferred languages for each usage.
Loool. Man Ada. I had a friend who said he had a connection at a local engineering company that did simulations among other things. Linked me the job and it was "Ada, Fortran, C, C++" and I noped the fuck out of that. Hard pass pidgeon holing myself into ada or Fortran.Yeah it's mostly tongue in cheek with me on the other language hate. I've used so many languages at work and they all have pros and cons for their applications.
Except ada. Fuck Ada.
Yeah it's mostly tongue in cheek with me on the other language hate. I've used so many languages at work and they all have pros and cons for their applications.
Except ada. Fuck Ada.
I think because product lifecycle in defense is like 20+ years so a lot of legacy products still use it and from my experience, defense companies won't rewrite stuff in newer code if they can duct tape together what they currently have to meet customer requirements.It's big in defense. Why, I will never know..
I knew that much as I had to learn it, but thankfully it's mostly phased out now except on old programs. And yes, I've had to write it. And it's awful.ADA was invented for DoD. I think the main requirement was the compiler error checking and strong typing. Can't have the missile launch fail with a runtime error.
Late to the party, but just curious.Programming puzzle(i.e. do my homework for me).
I have an abstract base class and a third party is going to subclass it. How can I instantiate those subclasses, without knowing what they are explicitly, once and only once and store those objects for later use? This is in Python, so static is not fully available.
I don't trust the third party. I find it better to assume the user is an idiot and try to correct/prevent as much fuckery said idiot could do. So, if they implement a subclass but never instantiate, how am I(the test system) supposed to know that? Worse, this could potentially linger months until someone finally notices where said subclass was supposed to do it's job but didn't. I'm sure everyone knows the pain of solving months-old bugs. Or even worse, months-old bugs covering up much more serious bugs.Late to the party, but just curious.
Who is instantiating these subclasses? This doesn't make sense to me. The third party that's extending the abstract class has the responsibility of instantiating their subclassed parts. Unless this is some sort of extensibility that's been allowed by the abstract class owner?
I don't know Python, but in C# or Java you would accomplish this via reflection.
Well, can you create a scenario where a particular subclass should have done 'X' and then test for 'X'? Rather than just making sure it's been instantiated. I mean, even if it is that doesn't tell you it's actually doing its job, right?These subclasses are designed to scan log output from our test system. I want them to be as trust worthy as possible so that if someone implements a subclass that's supposed to fail a test for a serious but rare issue, that will happen.
That is admittedly a flaw. Manufacturing a log so that you can test a new subclass is definitely a lacking feature atm and something I would like.Well, can you create a scenario where a particular subclass should have done 'X' and then test for 'X'? Rather than just making sure it's been instantiated. I mean, even if it is that doesn't tell you it's actually doing its job, right?
Again, I don' t know Python, only how I would do it in C#. But does this Stackoverflow thread help?That is admittedly a flaw. Manufacturing a log so that you can test a new subclass is definitely a lacking feature atm and something I would like.
I don't see the two as exclusive, though. I'd rather have both.
def import_class(cl):
d = cl.rfind(".")
classname = cl[d+1:len(cl)]
m = __import__(cl[0:d], globals(), locals(), [classname])
return getattr(m, classname)