IT/Software career thread: Invert binary trees for dollars.

ShakyJake

<Donor>
7,626
19,249
And this is why using c/c++ is retarded for data structures class. One spends more time wrestling with code instead of learning actual data structure concepts.

Python truly is king.
I totally agree. I have a lot of C# experience so I totally understand the concepts. But the other students in the class are new to programming so they are having to wrestle with the nuances of the C++ language which has nothing to do with data structures themselves. The professor keeps repeating "this is not a C++ course" so, truly, everything being taught could've used Javascript or Python instead.
 

ShakyJake

<Donor>
7,626
19,249
I do think what he's doing goes back to const usage in c++, a concept that I don't really remember
Also keep in mind that this is an introductory course to data structures and algorithms. We aren't expected to get super fancy with C++ (not suggesting 'const' is, but any very specific C++ operations or 'tricks' would be way over the head for most people in this course). Most students in the class, up to this point, have only been exposed to object-oriented programming with Java and that's it.

EDIT: Reviewing for the exam this week, I saw this in our textbook for Stack implementation:

Code:
template <typename E>
class Stack { // an interface for a stack
public:
int size() const; // number of items in stack
bool empty() const; // is the stack empty?
const E& top() const throw(StackEmpty); // the top element
void push(const E& e); // push x onto the stack
void pop() throw(StackEmpty); // remove the top element
};

Notice pop() doesn't return anything. Only top(). This makes sense and confirms that what the professor gave us to implement is incorrect.
 
Last edited:

alavaz

Trakanon Raider
2,001
713
I have seen implementations of pop return the value before. It's just that it makes more logical sense to call top() then pop(). In your specific implementation though, the const keyword is what keeps the variable from falling out of scope.
 

Deathwing

<Bronze Donator>
16,384
7,387
I think Python's standard implementation of pop returns the element. There might be some minor benefits to only having to make one function call instead of two but whatever. Both are common and possible is the point.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
This is one odd argument, if top should return the element it clears from the array?

It doesn't matter at all and that is not the point of learning what a stack is. Having the element being poped benefits you because when you want to use it, it saves you the call to peek, or top.

For example, the .net implementation of a stack is
Code:
public T Pop ();
where T is the type
Stack<T>.Pop Method (System.Collections.Generic) | Microsoft Docs
 

alavaz

Trakanon Raider
2,001
713
Nah I wasn't arguing whether it should or shouldn't. I just wanted to point out that it can be implemented both ways so that he doesn't assume his professor is wrong and bomb the assignment.
 

alavaz

Trakanon Raider
2,001
713
Anyone doing Splunk? Seems like socom is going balls deep on it. I set it up and fumbled my way through setting up a few reports. It seems very similar to the elk stuff I've seen out there. It's not terribly interesting to me but a couple of guys I used to work with are making some big bucks as Splunk consultants. My boss wants me to take some classes on it so I guess it will be a decent resume booster.
 

Noodleface

A Mod Real Quick
37,961
14,508
Started new job this week. Obviously can't say what it is but it's really nice actually. Nearly 100% classified work though. I'm stuck in a room with 20 engineers all day long.

Had an interview with Dell emc today and told them I'd need to cancel. I didn't feel right jumping through all the security hoops at work just to leave right after. Wasn't that much of a pay increase and with traveling an extra 1.5 hours each day I probably wouldn't have really made more money
 
  • 5Like
Reactions: 4 users

Ao-

¯\_(ツ)_/¯
<WoW Guild Officer>
7,879
507
Anyone doing Splunk? Seems like socom is going balls deep on it. I set it up and fumbled my way through setting up a few reports. It seems very similar to the elk stuff I've seen out there. It's not terribly interesting to me but a couple of guys I used to work with are making some big bucks as Splunk consultants. My boss wants me to take some classes on it so I guess it will be a decent resume booster.
It's awesome, and it's the same as elk stuff, just more under the hood. Lots of automatic field extractions, lots of modules from vendors, and various "specific" apps for normal usage (Security, Exchange, etc). I'm a huge fan of splunk, except for the cost.
 

Chris

Potato del Grande
18,197
-342
Hey guys, random question about website security certificates and I figured that someone here would know:

As mentoned before I'm making an education website. This needs to be viewable through the internet filters which places like High Schools have without having to ask IT to manually approve it - otherwise marketing my website will be very difficult.

I didn't buy a security certificate when I bought the webspace, so currently my website is blocked on all of the High School networks I've tested it on (I'm a substitute teacher so I visit random schools all the time). There's three different types of certificate availiable so I'm wondering which one I'm likely to need?

Buy an SSL Certificate to Secure Your Website
 

a_skeleton_03

<Banned>
29,948
29,762
wtf? Don't waste money on SSL certs. Let's Encrypt - Free SSL/TLS Certificates
I doubt godaddy shared hosting (I'm assuming) will let you install your own cert.

The cert is thrown on the webserver which means you can grab it from anywhere really. I highly suggest that you use the Lets Encrypt cert Chris Chris like genj suggested but you can also put Cloudflare in front of it as well which will do the same thing while also obfuscating the IP of your server.

Let me know if you have any web server questions and I will try to give you a hand.
 

Chris

Potato del Grande
18,197
-342
Thaks for the advice guys, really helpful.

So is the free certificate likely to be good enough for High School Internet filters?
 

a_skeleton_03

<Banned>
29,948
29,762
With that being said Chris Chris there might be some firewall lists you need to be approved on. The SSL will get you through a lot of web content that are just doing basic scanning.
 

Chris

Potato del Grande
18,197
-342
With that being said Chris Chris there might be some firewall lists you need to be approved on. The SSL will get you through a lot of web content that are just doing basic scanning.
Yeah each school has totally different setups but at the moment I'm just blocked no matter what due to no security.

Are there common firewall lists you can contact to be approved on?

Anyway I checked and seems like I can do the free certificate through godaddy, I just may need to renew it a few times a year.
 

a_skeleton_03

<Banned>
29,948
29,762
Yeah each school has totally different setups but at the moment I'm just blocked no matter what due to no security.

Are there common firewall lists you can contact to be approved on?

Anyway I checked and seems like I can do the free certificate through godaddy, I just may need to renew it a few times a year.
Yeah almost all hosts integrate SSL certs for LE because it's pretty damn simple now and the more websites have that the better the internet as a whole is. It will get you through a lot of things.

I don't know the popular school firewalls out there but I bet you could find that list pretty easy. I am sure that it's just a process where they check out your website and ensure that it's legit and educational in nature and then add it.