Ludovic 'Archivist'
Ludovic 'Archivist'
Most of their tests are regression tests
Ludovic 'Archivist'
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 ++?
Anonymous
Anonymous
in Linux
Ilya
Pavel
H̲i̲L̲e̲v̲e̲l̲
Artöm
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
H̲i̲L̲e̲v̲e̲l̲
olli
Vishnu
Vishnu
It's available for windows , Mac and linux
Anonymous
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?
Ludovic 'Archivist'
Ilya
Visual Studio Code ?
Ah, that thing...
If you can harness it to compile your projects then no problem
Ilya
András
David🇨🇺ElChino
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;
}
14•08
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
14•08
But wasn't online that why I delaying to reply
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()
14•08
Anonymous
Anonymous
Anonymous
Anonymous
Meh
lol you heard of the ITEE ?
Anonymous
14•08
Anonymous
Thank god no
https://en.wikipedia.org/wiki/Information-Technology_Engineers_Examination
14•08
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
David🇨🇺ElChino
I was just wandering why.
Thanks
David🇨🇺ElChino
👍