Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Arent there existing c++ xml-parsers out there? Or do you need a special feature?
-
@Gogeta70 what good reason could there ever be to not use an existing xml-parser?
-
@YouAreAPIRate Licensing. The company wants full ownership of the software without any legal issues relating to software licensing.
-
@Gogeta70 i did a quick search, there are some lgpl- or boost-licensed libraries. I'm no expert at that, but choosing one of those and checking the license should be faster than writing, testing and bugfixing your code.
-
@YouAreAPIRate Yeah, I know but the decision is from above my head, not much I can do. Plus I'm already halfway done with it. It's a fairly easy task overall, just a bit meticulous...
-
@YouAreAPIRate
Or you can just get a BSD or MIT licensed one, change one line of code, and declare it your own.
"Due to the extremely minimal restrictions of BSD-style licenses, software released under such licenses can be freely modified and used in proprietary (i.e., commerical) software for which the source code is kept secret." (http://linfo.org/bsdlicense.html/) -
@Zennoe Well, to be honest, I've been writing C++ for almost 15 years. I simply prefer the way it's been done for so long, and I'm pretty damn good at avoiding memory leaks doing it this way. So I see no need to change my coding style simply because a new language feature was added. I do like lambda functions though.
-
@Zennoe I guess I'm old-school... I don't use Valgrind or any other tools to profile my code. Essentially, I keep my code organized into easily understood and readable "blocks" - no function should perform super-complex tasks that are hard to follow. The code above is incomplete - mostly uncommented, and a big, confusing block of code. When it's done, I'll break it down into smaller private methods. As for memory leaks, I've run into a few here and there, but my general rule of thumb is to always allocate and free memory in the same layer of code. It keeps things easy to track mentally. Also, I monitor memory usage when I run my software to see if it's slowly increasing.
So, my method is be careful, be organized, and triple-check what your code is doing. :) -
@Zennoe Another thing... I've seen a lot of people get caught up in IDE's, compilers, profilers, etc etc. The whole point of being a programmer is to write code, not use tools.
As long as you write clean, efficient code that is readable and can be easily modified or built upon, nothing else matters so much. Just enjoy writing the code your way. -
@tiberius1900 I'm not saying don't use IDE's, hell I used codeblocks for a long time. Just don't get caught up choosing a tool.
-
@tiberius1900 Eh... I missed that, lol. Sarcasm is hard to detect on the interwebz :P
I have to write an xml configuration parser for an in-house data acquisition system that I've been tasked with developing.
I hate doing string parsing in C++... Blegh!
rant
i hate writing xml parsers