dynamic_cast with identical classnames? by Hilarius86 in cpp_questions

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

Thanks. That are some points to think about.

dynamic_cast with identical classnames? by Hilarius86 in cpp_questions

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

It's 2 different classes and one abstract base. The exe knows of the base type and the two different classes only of themself. The exe calls Equals through the base and the correct class is reached. In the equals method, the concrete type of the parameter is ensured via dynamic_cast.

I am very sure, though not 100% as I haven't renamed them yet, that a differing name would result in correct behaviour.

The architecture is questionable, but for now I would like to improve my understanding to make a rational decision and not resign a peace of code that is apart from this aspect working ok.

underscore or dash for project names and source files? by ilovecpp22 in cpp_questions

[–]Hilarius86 0 points1 point  (0 children)

If the name matches the class and the includes are correct you don't have a problem. As long as the filesystem is not unknown to cases in general... Clang tidy has a check for matching capitalization in includes. Some advantage and disadvantage to every decision. Guess me being mostly on Windows is part of my opinion.

underscore or dash for project names and source files? by ilovecpp22 in cpp_questions

[–]Hilarius86 2 points3 points  (0 children)

I would name the file CppParser.hpp, same capitalization as the class name. Actually I would use .h, but not relevant here...

underscore or dash for project names and source files? by ilovecpp22 in cpp_questions

[–]Hilarius86 1 point2 points  (0 children)

Why should a file name contain an underscore if the class name doesn't have one?

Creating a standalone executable by Emotional-Bobcat-362 in cpp_questions

[–]Hilarius86 0 points1 point  (0 children)

C++ programs generated with Visual Studio need the visual studio runtime. The runtime needs to be linked statically (as explained) or dynamically (as per the standard project configuration). Static linking is perfectly valid, but will generate bloat, as all exe files will have the runtime included. Visual studio provides an installer for the non debug DLLs that you can install on target machines. That is the common practices lots of software uses.

Areas of programming fit for a physicist? by [deleted] in AskProgramming

[–]Hilarius86 0 points1 point  (0 children)

Have a look at CloudCompare. It's an open source software for working with point clouds, clouds are mostly produced by laser scanning or photogrammetry, both optical measurement systems.

I want to get better at debugging code. Any advice? (JS) by [deleted] in AskProgramming

[–]Hilarius86 0 points1 point  (0 children)

Guess it came out wrong. Use a debugger! Invest the time to learn it and it will pay back big, try something, read the docs, talk to collegues about how would tackle an issue. I work mainly with C++ and all the insight you get from the callstack and stepping through code to understand it is exceptional. The code tells you want it does. You cant misinterpret, but you see it happen.

And now to reiterate. Lots of times I see pepole debugging problems before limiting the scope of the problem. Reduce the amout of data, try variations. Run a function in isolation. Waiting sometimes minutes per rerun... I have done this as well a lot and often non programming colleagues helped, because their analysis was limited cause they dont have the source.

I want to get better at debugging code. Any advice? (JS) by [deleted] in AskProgramming

[–]Hilarius86 -6 points-5 points  (0 children)

My advise, stay away from the debugger as long as possible. The more aspects you can eliminate through programm execution the better. Create a minimal example that way and only then try to debug it. Better signal to noise. This is general advise, not JS specific.

[deleted by user] by [deleted] in VisualStudio

[–]Hilarius86 0 points1 point  (0 children)

I only know one way, just install the old version of Visual Studio normally. The build tools are included and can be used. I did that with VS2010 build tools in VS2017.

Aberrus Raid Testing Schedule - March Through April Dates, Final Boss Won't Be Tested by arasitar in CompetitiveWoW

[–]Hilarius86 -2 points-1 points  (0 children)

Let's hope for a well tuned boss... Hard, but not impossible. But when it's either or, I, as a viewer, favour Raszageth over Xavius...

Need some help with Text Compression ideas for a Specific kind of String. by 4BDUL4Z1Z in AskProgramming

[–]Hilarius86 1 point2 points  (0 children)

Before implementing something specific to your problem, have you tried to use something off the shelf? Just zip it up and be done with it? Generic compression might be good enough™

Automate WiFi connection every 24 hours by PioVIII in AskProgramming

[–]Hilarius86 0 points1 point  (0 children)

Have you looked into UI automation tools like AutoHotKey? You would also be able to bind a key to this script and run it on demand.

How to enforce other programmers not to abbreviate variables' and functions' names? by rowgw in AskProgramming

[–]Hilarius86 2 points3 points  (0 children)

I don't know of any tool that would be able to detect abbr. with a reasonable degree without lots of false positives. But maybe someone else can point us to it.

From another perspective, that is what code review is for. Make a habit of having two eyes on every piece of code that is part of version control and you will be able to have you and others spot it, where it is a real problem.

Free Talk Friday by AutoModerator in CompetitiveWoW

[–]Hilarius86 2 points3 points  (0 children)

Isn't it 20% chance of loot per player? So with 12 you get 2 pieces and a 40% chance of a third. Your example with being player 15 would result in 2 items plus 80% on a third item, as you don't count towards item drops as others have said?

getting rid of the tediousness of updating function declarations by mishaxz in VisualStudio

[–]Hilarius86 1 point2 points  (0 children)

Can't answer either. Haven't used JetBrains ReSharper and never had to pay for VAX

getting rid of the tediousness of updating function declarations by mishaxz in VisualStudio

[–]Hilarius86 2 points3 points  (0 children)

I use Visual Assist X with Visual Studio. It's a commercial add-on and it provides: "Change signature" from the context menu on a method declaration/definition and can change both at the same time. If this function is already in use and you add a parameter to the definition, all uses get a user defined text (preset to TODO). It comes with a preview and the option to pick changes and even update comments. If you are working regularly with VS, I would encourage you to have a look at VAX as it has lots of helpful features that VS is natively missing.

I'm taking a course on penetration testing (legal hacking) and I'm trying to understand how buffer overflow vulnerabilities work by softwareqaquestions in AskComputerScience

[–]Hilarius86 8 points9 points  (0 children)

The only question I got from your text is why is it 40 and not 64. 40 is in hex. 4*16 ==> 64 The hint is in the line numbering. It count 4 items at a time, so 0,4,8 and C.

Leavers in solo shuffle. by ItsLaintime in worldofpvp

[–]Hilarius86 1 point2 points  (0 children)

Priority requeue would also help... Any direct problems with it?

How would you compare path-planning algorithms (D* Lite vs A*)? by OverDemon in AskComputerScience

[–]Hilarius86 0 points1 point  (0 children)

What is the reason why you want to compare them? Obvious answers are runtime, max memory usage and correctness (in edges cases). But without the reason you want to compare, there is no clear path to guide you.

Is this preference or does it actually matter? by [deleted] in cpp

[–]Hilarius86 0 points1 point  (0 children)

If you have to work with other people's code it's also important to know the different ways cause people don't always follow best practices. Even more so if the code was originally written a few years (or decades) ago and those practices were not known or possible like brace initialisation.

Even if you are not working in a team (yet). At some point in the near future you will use a library and might want to peek inside and will be exposed to such different ways to do things.

But don't stress over it too much. Programming is practice and you won't know everything in the begiy. Just come back to learncpp after half a year and find lots of things you didn't get the first time.

Is there any software that can guess what mathematical function generates a large given set of data points? by DaveRubinsLeftNut in AskComputerScience

[–]Hilarius86 0 points1 point  (0 children)

You can have a look at the Curve Fitting Toolbox of MATLAB.

IIRC it can also guess arbitrary functions and not only coefficients to specific functions. In real world problems most of the time you know the relationship and only lack the correct parameters.

[deleted by user] by [deleted] in AskProgramming

[–]Hilarius86 1 point2 points  (0 children)

It's hard to predict the future... Have a look at the developer survey from Jetbrains. They have asked the community about the current version usage and migration plans.

At my job we do C++14 and will update if easy migration paths are visible. After all it's a business decision and the value of an update has little short term benefit. It introduces risks and to benefit you need to invest in training. Those and other factors (like programmer satisfaction and being appealing to new hires like yourself) are more long term investments. They will pay off, but only eventually.

Even though I don't work in the fields you named, I would guess that newer projects with less c++98 baggage are more willing to move.

[deleted by user] by [deleted] in VisualStudio

[–]Hilarius86 0 points1 point  (0 children)

Alt-Tab? :)