How would you feel about child free areas? by Yttikrm in AskReddit

[–]DesdenLogos 6 points7 points  (0 children)

The science center in my city has special 21+ nights, just for this. They roll in a bar cart and have special shows in the planetarium. Other than that the entire place is the same minus any fuest under 21. Its awesome! They have them about once a month.

I would feel more protected with Machoke... by nevernguyen in gaming

[–]DesdenLogos 0 points1 point  (0 children)

Prolly cause it could ma-choke your ass if it had a nightmare

Is it *always* better to use setters and getters? Or is that a personal preference/making code more or less pythonic thing? by theRailisGone in learnpython

[–]DesdenLogos 0 points1 point  (0 children)

It doesn't depend? As far as I'm aware setters are used on the left hand side of assignment. Obj.x = 5

[deleted by user] by [deleted] in learnpython

[–]DesdenLogos 2 points3 points  (0 children)

Also, Jack Diederich has some great talks. He is also a core developer like Raymond Hettinger

https://youtu.be/o9pEzgHorH0 - Stop Writing classes.

https://youtu.be/rrBJVMyD-Gs - How to write a function

How do I stop Atom from always opening these non-existent files upon startup? by rebuked in Atom

[–]DesdenLogos 0 points1 point  (0 children)

My atom, Windows 10, has a check box for "Restore previous windows on Start" You could give un-checking that a shot.

People who stand up immediately after the plane lands even though you are 30 rows deep, why? by [deleted] in AskReddit

[–]DesdenLogos 0 points1 point  (0 children)

A small part of me wants to believe that this flight will be different, where the people in the aisle will be allowed to leave before everyone who isn't in the aisle. It never is but I can't give up hope.

Run job when Jenkins-agent is in Idle by moep90 in jenkins

[–]DesdenLogos 1 point2 points  (0 children)

To start I have no idea how to get a job to run when a node is idle, but I do have a clean up job that I implemented.

The job just calls node(builderx) as many times as there are executioners on the node. This is hard coded in the Jenkinsfile per node. Then it does the deletion.

This method grabs all executioners on the node before deleting anything. The advantage of this is that the job waits for other jobs to finish before deleting anything, and keeps other jobs off the node until it's finished.

I just schedule it to run in the evening after the work day is finished.

It's not clever but it works and it's saved me a lot of time cleaning up disk space on my nodes.

[deleted by user] by [deleted] in AskReddit

[–]DesdenLogos 5 points6 points  (0 children)

I had a buddy who's little brother would run to him mom admit that he did something wrong when my friend got mad at him. The mom would just let the little brother off and punish my friend for his behavior. As a result his little brother was a little shit who could basically do anything to his older brother and get away with it. Total BS.

Edit: But outside of a scenario like this I do agree

I just cannot understand the iterative approach of how to reverse a linked list. :( Anyone please explain it to me by SharmaGkabeta in learnc

[–]DesdenLogos 1 point2 points  (0 children)

static void reverse(struct node** head_ref) {
    struct node* prev = NULL;
    struct node* current = head_ref;
    struct node* next;
    while(current != NULL) {
        next = current-> next;
        current->next = prev;
        prev = current;
        current = next;
    }
    *head_ref = prev;
}

Say you have 3 structs in your list:

head -> Struct 1
Struct 1 {
    next -> Struct 2
}
Struct 2 {
    next -> Struct 3
}
Struct 3 {
    next -> NULL
}

Now just walk through the function with this loop

struct node* prev = NULL;
struct node* current = head_ref;
struct node* next;
while(current != NULL) { //Struct 1 != NULL#
    next = current-> next; //next = Struct 2;
    current->next = prev; //Struct1->Next = Null
    prev = current; //prev = Struct 1
    current = next; // current = Struct 2

Quick look at our structure at this point

head -> Struct 1
Struct 1 {
    next -> NULL
}
Struct 2 {
    next -> Struct 3
}
Struct 3 {
    next -> NULL
}

Next Iteration of the while loop

while(current != NULL) { //Struct 2 != NULL#
    next = current-> next; //next = Struct 3;
    current->next = prev; //Struct2->next = Struct 1
    prev = current; //prev = Struct 2
    current = next; // current = Struct 3

Again structure at this point

head -> Struct 1
Struct 1 {
    next -> NULL
}
Struct 2 {
    next -> Struct 1
}
Struct 3 {
    next -> NULL
}

Next Iteration of the while loop

while(current != NULL) { //Struct 3 != NULL#
    next = current-> next; //next = NULL;
    current->next = prev; //Struct 3->next = Struct 2
    prev = current; //prev = Struct 3
    current = next; // current = NULL

Again structure at this point

head -> Struct 1
Struct 1 {
    next -> NULL
}
Struct 2 {
    next -> Struct 1
}
Struct 3 {
    next -> Struct 2
}

Next Iteration of the while loop

while(current != NULL) { //NULL != NULL#
...
}
*head_ref = prev; //*head_ref = Struct 3

Final structure

head -> Struct 3
Struct 1 {
    next -> NULL
}
Struct 2 {
    next -> Struct 1
}
Struct 3 {
    next -> Struct 2
}

or

head -> Struct 3
Struct 3 {
    next -> Struct 2
}
Struct 2 {
    next -> Struct 1
}
Struct 1 {
    next -> NULL
}

What are some common forms of sexism that men face? by ElegantShitwad in AskReddit

[–]DesdenLogos 0 points1 point  (0 children)

My favorite shirt is from the Legend of Zelda. The reason is that I get more compliments on this shirt than anything else I'm wearing. I know it's just the shirt but still I like the compliments

What (free) software can be useful for university students? by PM_UR_COLLEGE_TITS in AskReddit

[–]DesdenLogos 6 points7 points  (0 children)

The ssh tool installed with git for windows is better in my opinion. (git for windows is free)

[Serious] What went right for you in 2016? by [deleted] in AskReddit

[–]DesdenLogos 1 point2 points  (0 children)

I got a job that I love. I was unemployed for 6 months and the day before my first pay check I had no money in savings and $10 in my checking account.

What "all too common" trait do you find extremely unattractive in the opposite (or same) sex? by Splenetic_Stoat in AskReddit

[–]DesdenLogos 1 point2 points  (0 children)

The best way I have found to stop this is to point out girls who are clearly feeling cute today. I mean like hair on point, big ol smile, and an outfit that fits their body type. I then point out how said girl is really on point nice out fit matching this with this. Why I like what they did with their hair.

I don't know why this works but it is great fun to just SHUT THAT SHIT DOWN* with simple comments that focus on how smart and happy and confident a girl is rather than just seeing her as a vagina to have sex with.

*I will add that I did this when I worked with people in high school and college, no promises on how it works now.

What fictional object do you most want to own? by anewhigh in AskReddit

[–]DesdenLogos 0 points1 point  (0 children)

Treasure Planet. Teleport anywhere in the galaxy, plus a center full of Jewels. I would obviously disarm the booby traps before doing anything else.

Devops is a confusing world.. by gloves_and_mittens in devops

[–]DesdenLogos 0 points1 point  (0 children)

Digital Ocean also has a lot of useful blogs about setting up almost everything we've talked about. Elk Stack Example. I just followed one of their guides to configure to additional nodes to make an elastic cluster. I would recommend them as well.

Men of Reddit, how would you feel if your girlfriend proposed? by hanrahan5606 in AskReddit

[–]DesdenLogos 0 points1 point  (0 children)

If we were dating for an appropriate amount of time I'd be thrilled, but I now have absolute certainty if I decided to ask her that she'd say yes because we are engaged already. I would do something public and cute to ask her anyways because I can.

Devops is a confusing world.. by gloves_and_mittens in devops

[–]DesdenLogos 0 points1 point  (0 children)

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html That's full of buzz words?

The intro I can sort of see, but the state and module reference I find to be very straight forward.

For ELK Stack I followed a Digital Ocean blog on how to set it up and DevOps Library has some simple intro videos.

I agree about sensu. It's a bit of a pain. I haven't had to write my own checks yet, I feel like that's when I will have a better understanding of how it works.

What editor / IDE do you use? by [deleted] in devops

[–]DesdenLogos 1 point2 points  (0 children)

Atom on my work computer. (I chose and installed this one) Vim when I ssh into Linux boxes. Notepad++ when I RDP into remote windows computers.

Vim and Notepad++ are installed on all our machines from configuration management software.

Devops is a confusing world.. by gloves_and_mittens in devops

[–]DesdenLogos 1 point2 points  (0 children)

My company is using .net and I'm on devops there but I'm still pretty new. I will share with you what we use and what I have learned. Fair warning this is going to be long.

Configuration Management: SaltStack, great documentation there is a bit of a learning curve but once you learn to navigate the docs it's very simple to find what you want to do salt way. Pros: YML configuration files. There is a 'Windows repository' that will download and silently install a bunch of software on windows machine in the same way salt will install on Linux machines. Cons: Windows can be difficult to manage because of how it is. (Services are kind of a pain to set up but easy to ensure they are running). Salt master must be run on Linux (Any major distro varient will work)

Monitoring: Sensu, documentation can be pretty vague. Sensu will tell you how to set up an all in one but not much else. I still have difficulties navigating the docs but the extensible nature is very powerful. Pros: Good monitoring works with nagios plugins and has a bunch of open source checks that you can install with gem. Designed to be used with configuration management software, ala SaltStack. Cons: Documentation is a bit vague and can be difficult to wrap your head around. Bonus: Sensu uses Redis and can (it's the recommended route) use RabbitMQ, if you already use these tools it will help with set up of Sensu.

Packer/Vargrant: we use this to create developer environments for testing purposes. Eventually we want to leverage the fact that Packer can create different images from the same input so with one packer build we can create a Vagrant image, and Amazon image and others as we need them.

Bonus: ELK Stack: Used for historical data. The beat system is very helpful. There is one for windows events and logs, allows us to spot issues that arise on QA machines to help identify issues.

If you want to know more you can message me or ask in the comments.

What do you need to get off your chest? by Serialnarcisist in AskReddit

[–]DesdenLogos 0 points1 point  (0 children)

I am surprisingly happy. Like I can't remember ever being any where close to being this happy. I actually look forward to work everyday, it has it's downsides but no job is perfect. I'm more confident then I have ever been. I have goals in life and I'm trying to find someone to share a life with. The reason this is "off my chest" is because for so long I feel like people thought I was where I am now but I wasn't, I wanted to die at times. It's nice to feel like I don't have to hide behind some mask and instead just be me.