Ludovic 'Archivist'
Ludovic 'Archivist'
Most of their tests are regression tests
Javi
They also are there since 20 years making more tests with each bug fix
Whatever. I doubt the first time they got "100% coverage" (which we should see what it means) they only had two lines of test per line of code
Ludovic 'Archivist'
Whatever. I doubt the first time they got "100% coverage" (which we should see what it means) they only had two lines of test per line of code
You would actually be surprised by the number of tests of their th1 required to have the 100% coverage
Ludovic 'Archivist'
Basically, for day to day they only use a subset of the tests and only run the full test harness for releases
Ludovic 'Archivist'
You never have enough lifes to run the whole test solution of a 20yo project at each git/fossil/hg/bazaar commit
Javi
Maybe, but I seriously doubt that they drop 660 lines of test code
Ludovic 'Archivist'
If you do your tests only unit by unit, you'll need to hire a QA for each dev
Ludovic 'Archivist'
If you test everything by feature, you gain time for both and have close to 100% branch coverage and generally only have to add a few unit tests
Ludovic 'Archivist'
For example testing you can run every form of language of your database and execute the related query correctly (which may imply failing the ill formed ones) will go through a huge lot of your code at once
Ludovic 'Archivist'
Also yes, using a DSL for testing gains you lots of time as you get more focused on hitting the code you wrote than on figuring how to hit it
Anonymous
Is it advisable to use visual studio code to program in C ++?
Ilya
Is it advisable to use visual studio code to program in C ++?
Visual Studio - yes, on Windows this is a mainstream compiler.
Anonymous
in Linux
Ilya
Pavel
What is this?
An editor
Pavel
Is it advisable to use visual studio code to program in C ++?
It's preferred to use some IDE made specifically for C++ like Visual Studio, because it'll give your lot of good tools like debugger, profiler, integrated unittests runner
Artöm
Is it advisable to use visual studio code to program in C ++?
Take normal ide if posdible. vs, qtcreator, clion
Pavel
It is absolutely useless for beginners
It depends, some teachers explain even simple things with debugger to see the state of the app as it's being exetuted. And it's anyway a good idea to learn how to use a debugger as early as possible
olli
Visual Studio - yes, on Windows this is a mainstream compiler.
visual studio is no compiler, it's an IDE
Vishnu
It's available for windows , Mac and linux
Anonymous
Ludovic 'Archivist'
Is it advisable to use visual studio code to program in C ++?
Pretty OK, it is my main IDE on all platforms that support Clang and gdb, which is all main platforms
Ludovic 'Archivist'
visual studio is no compiler, it's an IDE
Well, Visual Studio is an IDE that ships with the Visual C++ Compiler
olli
Well, Visual Studio is an IDE that ships with the Visual C++ Compiler
you can install VS without the C++ compiler. Just wanted to point out VS is not a compiler. Additionally you can install the build tools without the IDE (VS).
Ludovic 'Archivist'
Well, you can install VS with pretty much everything, nothing included, the installer is half deadly good and deadly bad
Tomas
How does c++ evaluate double to nan? I am doing some matrix calculations and finally found out my program crashes because of NaN. Could it be that number gets assigned NaN if some bounds are exceeded?
Tomas
https://en.wikipedia.org/wiki/NaN#Operations_generating_NaN
Ups I divided by 0. Thx. Sry for not being to google this out on my own.
Ilya
Visual Studio Code ?
Ah, that thing... If you can harness it to compile your projects then no problem
Ilya
visual studio is no compiler, it's an IDE
No, it is a compiler and an IDE
olli
No, it is a compiler and an IDE
Visual Studio is not a C++ compiler, msvc (cl.exe) is
András
Is it advisable to use visual studio code to program in C ++?
It's a stupid idea to write code in visual studio
Anonymous
typedef struct island{ char *name; char *opens; char *closes; struct island *next; // this is a recursive structure }island; void display(island *start); island* create(char *name); void release(island *start);
Anonymous
i have a struct that i created that is recursive to make a linked list and three functions. display, create, and release , display is there to display the linked list , create is there to make new island variables using the island structure and release is to used to release the dynamic memory from the heap once it is completed
Anonymous
that first bit of could is the header file
Anonymous
#include <stdio.h> #include "header.h" #include <stdlib.h> // malloc() and free() functions are located in this library #include <string.h> // != NULL = i->Next void display(island *start){ island *i = start; for(;i != NULL; i = i->next) printf("Name: %s Open: %s-%s\n", i->name,i->opens,i->closes); } } island* create(char *name){ island *newIsland = malloc(sizeof(island)); newIsland->name = strdup(name); newIsland->opens = "9:00"; newIsland->closes = "17:00"; newIsland->next = NULL; return newIsland; } void release(island *island){ island *i = start; island *next = NULL; for(;i != NULL; i = next){ next = i->next; free(i->name); free(i); } }
Anonymous
this next bit of code is the functions.c file, it defines the functions that are declared in the header
Anonymous
#include <stdio.h> #include "header.h" #include <string.h> int main(int argc, const char *argv[]){ island *start = NULL; island *i = NULL; island *next = NULL; // for (initialization; condition test; increment or decrement) char newIslandName[80]; for(;fgets(newIslandName, 80, stdin) != NULL; i = next){ next = create(newIslandName); if(start == NULL) start = next; if (i != NULL) i->next = next; } display(start); release(start); return 0; }
Anonymous
Memory allocation right?
yes . and this is my main document , basically this program is suppose to take data from a file ./a.out < somefile.txt , like so , and
Anonymous
then display the data from the each structure created , and then release it from the heap
Anonymous
i am learning about dynamic memory
14•08
Ooh great
Anonymous
the compiler is saying the pointers next, i , and start are not declared in the release function
Anonymous
so basically we have a recursive struct called island , a create function that creates new versions of the island data type , with different names, and created a linked list of these island data types until there is no names left provided , a display function that continues to display each island until the next, the recursive member of the struct is NULL, and a release function that clears memory allocated on the heap
Anonymous
at least thats how its suppose to work
Anonymous
but the compiler is not agreeable today : )
Anonymous
Ooh great
if you take a look at where at went wrong and give a clue that would be great also 😃
Anonymous
nvm
Anonymous
i think i see 😂
Anonymous
yea it compiling now
14•08
if you take a look at where at went wrong and give a clue that would be great also 😃
It's so hard to identify error by looking 😂😂 unless yo test in compile again .
14•08
But wasn't online that why I delaying to reply
Anonymous
It's so hard to identify error by looking 😂😂 unless yo test in compile again .
its all good i figured it out, just combing through the code now so i have a better understanding of everything
Anonymous
basically i learnt how to make a linked list, how to allocated dynamic memory , how to free that memory ,
14•08
Ok that great
Anonymous
also using strdup()
Anonymous
Anonymous
also using strdup()
You learn C or C++?
Anonymous
Anonymous
Anonymous
Meh
lol you heard of the ITEE ?
Anonymous
14•08
sure lets see whats up
Ok just minutes
Anonymous
Thank god no
https://en.wikipedia.org/wiki/Information-Technology_Engineers_Examination
14•08
Meh
😂😂
Anonymous
i studying for this , requires C or java knowledge , so i choose C, since i have a little bit of C++ knowledge, and kinda want to go deeper into C++
Anonymous
😂😂
you know how the C++ fanboys are
Anonymous
i am starting to like C alot , i feel like its more manageable to learn ,
András
Why's that?
Becouse vs is garbage. It's very hard, so u spend a lot of time just for waiting. It has bad compiler: the latest version of compiler(should include c++17 and already completed c++20 features) does not compile c++17 code(even if it is not major changes). Vs can refuse to open the file, just becouse the file is open(even if it is closed)
David🇨🇺ElChino
I was just wandering why. Thanks
David🇨🇺ElChino
👍