Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

01-25-2018 , 02:28 AM
gl jmakin hope you get it

building a game of any type would be awesome
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 04:23 AM
gl jmakin
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 06:46 AM
Idk maybe I set it up wrong but Visual Studio seemed bulky, unintuitive, and slow. It made it difficult for me to concentrate on learning the code because I was so confused by the Ide and the tutorials seemed like too much hand holding I couldn't quickly learn how to do something I wanted to do.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 11:23 AM
It's certainly possible that I tried to run before I could walk with Visual Studio. I did install a lot of different development options thinking I would experiment with some and see which I like.

That could cause both the slowness and confusion on using Visual Studio.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 12:00 PM
Visual Studio is great but when you're learning I think it's generally best to start with as little in the way of magic-based tooling so that you focus on learning how things work, not just what buttons you need to press.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 12:40 PM
Quote:
Originally Posted by candybar
Visual Studio is great but when you're learning I think it's generally best to start with as little in the way of magic-based tooling so that you focus on learning how things work, not just what buttons you need to press.
This is exactly how I felt. I felt like there was all of this stuff going on and I couldn't tell what was important to learning coding and what was important to learning VS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-25-2018 , 08:46 PM
Learning visual studio is maybe one of the easier ones I've had to deal with - what are you comparing it to?

The first IDE I ever used was eclipse for java. That's an actual nightmare.

In comparison VS is smooth and crisp. The debugging tool is pretty straightforward. Setting up VS is pretty automatic, as opposed to say eclipse where you sometimes need to tweak your environment variables just to get a simple "hello, world" to run.

I mention eclipse because java is such a commonly taught first language and is bound to be people's first experience with an IDE. I'd much rather teach people on VS starting out.


also thanks for the luck wishes everyone!! I'm excited, this is my first interview for a CS job. It's not going to be a technical interview and I actually have relevant experience I can bring up, so I'm feeling super confident.

Last edited by jmakin; 01-25-2018 at 09:11 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-26-2018 , 01:28 AM
The only real 4th generation (or 3rd or whatever drag-and-drop programming is) IDE I've ever known is x-code. Pretty steep learning curve but it definitely made some thins a lot easier than they would have been in a fancy text editor.

My takeaway though is this kind of tooling can only work in a completely closed ecosystem. And I'd rather work in an open-standards eco-system.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-26-2018 , 09:05 AM
Quote:
Originally Posted by jmakin
Learning visual studio is maybe one of the easier ones I've had to deal with - what are you comparing it to?

The first IDE I ever used was eclipse for java. That's an actual nightmare.

In comparison VS is smooth and crisp. The debugging tool is pretty straightforward. Setting up VS is pretty automatic, as opposed to say eclipse where you sometimes need to tweak your environment variables just to get a simple "hello, world" to run.

I mention eclipse because java is such a commonly taught first language and is bound to be people's first experience with an IDE. I'd much rather teach people on VS starting out.


also thanks for the luck wishes everyone!! I'm excited, this is my first interview for a CS job. It's not going to be a technical interview and I actually have relevant experience I can bring up, so I'm feeling super confident.
Not really comparing it to much of anything. Last major programming I did was 1 class in college and that was Python probably in Idle but I don't remember now it was a long time ago.

I have tried teaching myself C and C++ and have familiarized myself with the syntax of C# but wouldn't say I would kill it as my OO design patterns are crap. Which I am working to rectify but I am crap awful and making myself program in my free time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-26-2018 , 12:11 PM
imo design pattern theory is nice and everything but you shouldn't worry too much about them unless you're working on/designing a very large project.

They're helpful because they're solved solutions to very common problems but it's really not worth beating yourself up about.

one of my favorite "light reading" programming books is called "anti-patterns" and consists of examples of terrible programming implementations.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-26-2018 , 12:35 PM
Quote:
Originally Posted by jmakin
imo design pattern theory is nice and everything but you shouldn't worry too much about them unless you're working on/designing a very large project.

They're helpful because they're solved solutions to very common problems but it's really not worth beating yourself up about.

one of my favorite "light reading" programming books is called "anti-patterns" and consists of examples of terrible programming implementations.
Thanks I will look into that
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-26-2018 , 01:20 PM
Rusty,

this was the TA's solution to the convex hull problem:

Quote:
Describe an O(n log n) time method for determining if two sets A and B of n points in the
plane can be separated by a line.
First, note that A and B can be separated by a line if and only if their convex hulls do not
overlap. This is because if two point sets can be separated by a line, then their convex hulls
2
are also separated by that same line.
So our method will rst compute the convex hulls of A and B. This takes O(n log n) time
with the Graham scan algorithm.
Next take any point of A, and check if it is inside the convex hull of B. Then take any point
of B, and check if it is inside the convex hull of A. This is the case if that point lies below
every edge in the upper hull, and above every edge in the lower hull. If either of these is true,
then one hull lies at least partly inside the other, and they cannot be separated.
Next we check for intersections between the two convex hulls. This can be done in linear time
by comparing the possible pairs of upper and lower hulls separately. For each of these four
pairs, we traverse the points on the convex hull from left to right, at each step incrementing
the point that has a smaller x coordinate.
If there is no intersection, we know that there is a point in A outside the convex hull of B; a
point in B outside the convex hull of A; and the two convex hulls never intersect. Therefore,
they must be disjoint. QED.
I'm not sure his first step - check if each point in A is in B - is necessary or necessarily O(nlogn) or better. The 2nd part is not asymptotically faster than my solution but a little cleaner.

we just spent a week on the museum guard problem, interesting stuff, although I am absolute garbage at this
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 10:18 AM
I noticed an interesting problem yesterday that has me stumped

I'm running a few instances of an API using gunicorn/flask in AWS. The main API in question is meant to be hit by a program called "osquery" which is using the API to periodically report results. The POST is a blob of JSON data, under normal conditions it's about 1-2k, nbd.

I've made some rpm and deb packages that will install osquery, and a few other things, and configure it for you. I made some docker images that are based off centos and ubuntu, and will download the rpm and deb package respectively, and start up osquery, so that it will start hitting the log endpoint.

I have this running on 2 machines, one container of each flavor on each. I have
1. a linux machine runner centos and ubuntu via docker
2. a mac laptop running centos and ubuntu via docker
each is running what should be identical containers

However...

The requests from the linux machine are MUCH slower than the ones from the osx machine. Around 100ms instead of 10s.

I narrowed it down to a single culprit. In flask you can get the POST data using request.get_data() (request is a global variable that has info about 'this request'). If the request comes from a linux-hosted docker container, get_data() takes around 80ms. If it comes from a OSX hosted docker container, it takes less than 0.1ms

Keep in mind, the containers are hosting the *client*. And the requests look pretty much the same to me. Both machines are on my local network, although one is hardwired and the other via wifi. So far I haven't been able to even theorize on a cause.

I love docker, but don't fall for the notion that it's a true build once run anywhere solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 10:54 AM
thats what you get for using a mac
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 10:58 AM
Quote:
Originally Posted by lostmypw
thats what you get for using a mac
Better performance?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 11:00 AM
hmm, you have two machines, one on Ethernet that responds in 10ms, and one on Wifi that is more like 100ms. This seems pretty obvious tbh. Though even still, 10ms sems pretty slow for a hard wired connection
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 11:18 AM
Quote:
Originally Posted by _dave_
hmm, you have two machines, one on Ethernet that responds in 10ms, and one on Wifi that is more like 100ms. This seems pretty obvious tbh. Though even still, 10ms sems pretty slow for a hard wired connection
Other way around.
The linux machine is hardwired, 100ms
Mac is wifi, 10ms

10ms turnaround for an API call is not exactly the bare minimum but pretty close
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 02:46 PM
https://docs.docker.com/engine/admin...-cfs-scheduler

Quote:
--cpu-period=<value>

Specify the CPU CFS scheduler period, which is used alongside --cpu-quota. Defaults to 100 micro-seconds. Most users do not change this from the default. If you use Docker 1.13 or higher, use --cpus instead.
seems awful coincedental
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 02:49 PM
Quote:
Originally Posted by RustyBrooks
Better performance?
I didn't even know you could run linux docker containers from mac. I thought the whole idea was the kernel was used directly and docker just isolated a user space.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 02:56 PM
Quote:
Originally Posted by lostmypw
ms is milliseconds, i.e. 1000x more than microseconds
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 02:59 PM
Quote:
Originally Posted by lostmypw
I didn't even know you could run linux docker containers from mac. I thought the whole idea was the kernel was used directly and docker just isolated a user space.
You can, you can also run linux containers from windows, I think, although I've never tried. For osx there is probably a virtualization layer. I think in the older days of docker, they used virtualbox and now it's hyperkit.

Most things are the same, there are always little hiccups between them though. This one really has me stumped, though. If it was the *server* running on the docker containers, that might make more sense, but the server is the same in all 4 cases, running in AWS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 05:09 PM
I'm beginning to wonder if the switch that the linux box is connected to is going bad. This morning, everything on that circuit lost internet access and it wasn't restored until I restarted it. So the answer might not be "mac vs linux" or "wired vs wifi" but rather just "****ty router vs non ****ty router"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 05:11 PM
I guess I can test that later by plugging the mac into it. Oh, except I don't have a ****ing thunderbolt adaptor for ethernet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 08:21 PM
I have spent zero amount of time ****ing around with docker and my life seems better for it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-27-2018 , 09:34 PM
Can anyone explain to me how the live game clock updates here work? It looks like the updates are being made by espn-critical.js, which is obfuscated. More than that I can't figure out. It doesn't look like there are any server requests being made which contain the data, so I'm a bit mystified.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m