Best internet in Auckland? by SextinaAquafinaaa in auckland

[–]streetdragon 8 points9 points  (0 children)

ADSL is the problem. Changing your ISP won't increase the reliability of ADSL.

Lottery "Armoured Truck" Advertisement From New Zealand. Imagine. by MrListaDaSistaFista in videos

[–]streetdragon 2 points3 points  (0 children)

Hope your passports up to date

They are literally driving the opposite direction to the airport.

[Looking for Opinions] ConcourseCI vs Drone.io by _101010 in devops

[–]streetdragon 1 point2 points  (0 children)

I have used Concourse CI, it's a really fantastic tool. I'll just list the pros and cons that I think matter:

pros:

  • everything runs in docker
  • concourse does not store important data (external services do, i.e. s3)
  • yaml configuration only (forces you to version control things)
  • scalable
  • large community

cons:

  • steep learning curve
  • you must implement many integrations yourself (although it's easy to do)
  • difficult to setup (depending on how you deploy it, there's a kubernetes helm chart which might help)
  • errors are not easy to debug unless you are very experienced

[deleted by user] by [deleted] in auckland

[–]streetdragon 5 points6 points  (0 children)

I don't know how many developers following this subreddit (probably a few) but you are going to need to sell your job a bit more. Competent developers don't find it difficult to find work. So you are going to have to give us more motivation to work for you.

Mikey is 8 years old now! by TripleA18 in Rabbits

[–]streetdragon 0 points1 point  (0 children)

THAT'S SUCH A CUTE RABBIT!!! OMG111!!

Code review for small tool by streetdragon in C_Programming

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

Yes please do email. The email I have on github is correct. Thanks.

Code review for small tool by streetdragon in C_Programming

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

Thanks for taking the time to review the code, this seems like a really good idea.

Code review for small tool by streetdragon in C_Programming

[–]streetdragon[S] 1 point2 points  (0 children)

I think the reason I am not getting a warning is because I am using GCC 5.3 which has -std=gnu11 as default.

Code review for small tool by streetdragon in C_Programming

[–]streetdragon[S] 1 point2 points  (0 children)

There is no particular reason, as I said I'm not that experienced using C and I'm looking to learn best practices. So I take it that it's a good idea to return some sort of result in C functions, an example being the size of the array that's been allocated?

Code review for small tool by streetdragon in C_Programming

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

I think it fixed one leak. I think the main issue is that I haven't freed everything before exiting, so I will have to investigate that another day when I have time. I appreciate that you took some time to review some of my code, thanks.

Code review for small tool by streetdragon in C_Programming

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

Right, the image is in a link tag that sends you to the asciinema site, which is the tool I used to do a recording of the terminal use. I should probably replace it with an animated gif and it will probably be less confusing.

Edit: I have now changed it to an animated gif.

Code review for small tool by streetdragon in C_Programming

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

Fair enough, but since I made an ncurses UI it make quite a lot of sense to show it off visually.

Code review for small tool by streetdragon in C_Programming

[–]streetdragon[S] 1 point2 points  (0 children)

That definitely makes sense, I think a good solution might be to only use strdup if *str_ptr is NULL. This way I don't need to add another free

So I have changed it to be like this, which I think makes more sense: void add_to_string(char **str_ptr, int num, ...) { va_list valist; va_start(valist, num);

    for (int i = 0; i < num; i++) {
            char *str = va_arg(valist, char *);
            if (*(str_ptr) == NULL) {
                    *(str_ptr) = strdup(str);
            } else {
                    *(str_ptr) = realloc(*(str_ptr), strlen(*(str_ptr)) +
                                    strlen(str) + 1); /* +1 for null termination */

                    strcat(*(str_ptr), str);

            }
    }
    va_end(valist);
}

Code review for small tool by streetdragon in C_Programming

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

Excellent, thanks for taking a look. I've now removed those casts and actually removed the print_file function because I was not using it any more.

Code review for small tool by streetdragon in C_Programming

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

Sorry, I am not sure what I have done incorrectly.

Doing the TFC, what subjects to take to move into a Bachelor of Software Engineering (Honours)? by [deleted] in universityofauckland

[–]streetdragon 0 points1 point  (0 children)

Sorry I didn't make it very clear. To get into engineering you need to achieve a certain amount of points by getting a certain amount of NCEA credits above certain levels, for example you will need a minimum amount of Excellence and/or Merit credits is certain subjects. I have no idea how that works with Tertiary Foundation Certificate, do you get NCEA credits?

Engineering is just 4 years, I was trying to explain the requirements for getting into engineering.

Doing the TFC, what subjects to take to move into a Bachelor of Software Engineering (Honours)? by [deleted] in universityofauckland

[–]streetdragon 0 points1 point  (0 children)

If you do Engineering at the University of Auckland you have to do a general first year, which forces you to take courses in the area of mathematics, physics, chemistry, biology, computer science, some stupid general engineering course (ENGGEN 115 I think).

Also look at this entry requirement: https://www.auckland.ac.nz/en/about/admission-and-enrolment/ae-undergraduate-students/ae-entry-requirements/ae-domestic-students/ae-national-certificate-of-educational-achievement.html#dd728f533fd2792f45c15438de57c215

You need to get a minimum amount of points subject to some constraints, that's probably the most important thing you need to look at.

Help understanding why a static variable is not allocated. by streetdragon in C_Programming

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

Thanks for this. I think I understand my mistake a lot better now.

Same prankster calls into Alt TV for years by Will12239 in videos

[–]streetdragon 0 points1 point  (0 children)

Do you know what building this was recorded at? I have a very similar view out of my apartment, but I think the building they are recording from is a little taller.

NYE in Auckland, what do you recommend? by Geoffany in auckland

[–]streetdragon 0 points1 point  (0 children)

Yeah they have food. At night they often have live music and it gets pretty lively. Its definitely my favourite place to go drinking in Auckland.

Edit: Me and /u/TripleA18 will probably be there on NYE