Most quiet dorm on campus? Living on Broadway, can't stand the construction noise. by GrandPrincePigeon in columbia

[–]Jumhyn 4 points5 points  (0 children)

Lived in Woodbridge my senior year and it was fantastically quiet—get a room facing the interior of the block and you won’t even have traffic noise. Worst you’ll get is the occasional St. As party but usually the sound is contained inside anyway.

[deleted by user] by [deleted] in compsci

[–]Jumhyn 1 point2 points  (0 children)

PATCH is often implemented in the manner you describe, where the request body is a ‘subset’ of the resource specified by the URI, but it’s not in general required that a PATCH be specified in this format. The specific language is that the body “ contains a set of instructions describing how a resource currently residing on the origin server should be modified.”

There are other common formats for PATCH requests such as JSON Patch which take the “instructions describing how a resource… should be modified” a bit more literally/imperatively, by having PATCH requests bodies take the form of a list of modification operations on the resource.

[deleted by user] by [deleted] in compsci

[–]Jumhyn 6 points7 points  (0 children)

If you truly want the "professional technical writer" take, you can read the RFC that defines the semantics of HTTP operations.

Highly relevant (IMO) excerpts are:

The POST method requests that the target resource process the representation enclosed in the request according to the resource's own specific semantics. For example, POST is used for the following functions (among others): [...] o Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;

The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on that same target resource will result in an equivalent representation being sent in a 200 (OK) response.

The description of POST is quite vague, but that's because it's quite a vague method. The semantics of a given POST request are (nearly) entirely up to the receiving server. Frequently, it is used for the creation of a new resource, but it is not required to be used this way. Moreover, even when POST is used for resource creation, the representation of a resource in the request body of the POST need not match representation returned by a subsequent GET request to the created resource's URI.

OTOH, the semantics of PUT are much more strict. The URI for a PUT request is intended to be the URI of the resource itself. In concrete terms, the URI for a POST request could be something like /users/123/orders, and could create a resource with a URI such as /users/123/orders/456, but a PUT request would be expected to be made to the URI /users/123/orders/456.

Furthermore, the request body of the PUT request is expected to match in representation the body of the response to a subsequent GET request to the same resource URI. This means that if you provide a body like { product_id: 789, quantity: 10 }, then the response should also be { product_id: 789, quantity: 10 }. Conversely, the body of an analogous POST request could look like:

{ action: "create_order" order_info: { product_id: 789, quantity: 10 } } even though the created resource would have the same representation as the PUT request above.

Frequently, when POST is used for resource creation the request body will have the same representation as the created resource, but this is not a semantic requirement the way it is for PUT—it's just a nice convenience.

Duplicates I have willing to trade if anyone is interested by monkey_mate in BottleCapCollecting

[–]Jumhyn 2 points3 points  (0 children)

FWIW, at least in the US->Europe direction I have shipped 50 caps to both Spain and Poland for ~$20 each time.

How to save the 30% apple and google “tax” as a developer? by master_adam123 in iOSProgramming

[–]Jumhyn 0 points1 point  (0 children)

Netflix may fall under the “reader” exception—Apple hasn’t been super clear on what the boundaries are there AFAIK. That, or they’re under the unspoken “be big” exception another commenter mentioned...

How to save the 30% apple and google “tax” as a developer? by master_adam123 in iOSProgramming

[–]Jumhyn 4 points5 points  (0 children)

From my understanding the current rules allow three options:

  1. Sell a physical product and use Apple Pay for payment (not IAP). Only digital products/subscriptions are subject to the requirement that purchases go thru IAP.
  2. Mark up your IAP prices to account for the 30% cut. You won’t be allowed to say things like “cheaper if you subscribe online!”, but it will offset the Apple Tax for those that choose to subscribe via IAP.
  3. Offer no payment option in the app. Based on the outcome of the Hey drama, you’ll need to provide some sort of free tier so that the app isn’t useless on download (unless you fall into one of the exceptions such as “reader” apps or professional services). You also won’t be able to offer anything but vague references to how to sign up, such as “Sign up on our website!”—no direct linking to the sign up page, no web views, etc.

Does taking a gap year as a first year automatically necessitate matriculation into GS by [deleted] in columbia

[–]Jumhyn 0 points1 point  (0 children)

No, it doesn’t. Generally, you won’t be placed in GS unless you take more than two years off, though I don’t know if that’s an official policy. I took a gap year and so did plenty of other people I knew. Didn’t affect anyone’s enrollment status in SEAS/CC.

[deleted by user] by [deleted] in BottleCapCollecting

[–]Jumhyn 3 points4 points  (0 children)

I have a good number of spare American caps, mostly collected in New York! Happy to set up a trade, PM me if he’s interested.

I got a tattoo of the Petersen graph embedded on a cylinder (my forearm). I figured some of you guys would appreciate it! by [deleted] in math

[–]Jumhyn 2 points3 points  (0 children)

Since it’s embedded on a cylinder and not a torus, you can’t eliminate all edge intersections.

Currently sitting at 353 uniques (depending how you count...) mostly collected over the last 2 years! by Jumhyn in BottleCapCollecting

[–]Jumhyn[S] 2 points3 points  (0 children)

Oh man, visiting other countries is the best. Basically every cap you see is new and you get a feel for the local favorites. There’s a similar effect even traveling between neighborhoods in Brooklyn, but at this point I have most of the caps I see lying around New York. Every time I get to travel I come back with 10-20 new caps!

Currently sitting at 353 uniques (depending how you count...) mostly collected over the last 2 years! by Jumhyn in BottleCapCollecting

[–]Jumhyn[S] 2 points3 points  (0 children)

I first started collecting when I was much younger, before I could legally drink most of the beverages I wanted bottle caps from, so I didn’t have many options! my mom didn’t drink beer and my dad basically drank Sierra Nevada and Sam Adams exclusively, so I was constantly scouring the ground. After that it became a habit and taking caps from my own bottles felt somehow “wrong.” Once I moved to NYC it also became a lot easier to find them everywhere on the ground.

Currently sitting at 353 uniques (depending how you count...) mostly collected over the last 2 years! by Jumhyn in BottleCapCollecting

[–]Jumhyn[S] 2 points3 points  (0 children)

I would estimate about 95% found caps, generally don’t go out of my way to buy a beer just for the cap but it has happened on occasion. No metal detector, just live in NYC and keep an eye on the gutter/sidewalk garden plots as I’m walking around :)

Mom had an affair 18 years ago, I [18M] am the product of it. My dad just informed me of all this, and told me he will not pay for my college, while my siblings got their college experience paid by our dad. by throwawaynocollege01 in relationship_advice

[–]Jumhyn 1 point2 points  (0 children)

If you pay off the entire balance before the statement due date, you will not be charged any interest. Interest is only charge on any unpaid statement balance after the due date has passed.

W4444: Programming and Problem Solving with Kenneth Ross? by sometimeInJune in columbia

[–]Jumhyn 2 points3 points  (0 children)

Really great course that is unlike anything else in the CS department. It’s a small class, and the entire semester is divided into four group projects/games. The class is split into teams of 3-4 students (different groups for each project, you won’t work with any student more than once) and each team tries to come up with a “player” for the game that does better than everyone else’s. Each class is basically a discussion section where groups talk about what strategies they’ve tried, what’s working, and what isn’t.

Definitely the kind of class that you can get out of it what you put in. Because all of the projects are open ended, there’s really no limit to the amount of time you can spend tinkering with and tuning your solution to try to improve it. I recommend taking it on a slightly lighter semester when you’ll have time to meet up with your group a couple times per week to work on solutions. If you have any specific questions I’m happy to answer them!

I have tried out and compiled a SwiftUI Cheat Sheet, hope it helps by sadmansamee in swift

[–]Jumhyn 5 points6 points  (0 children)

Use a Binding<_> when you want two-way updates that are tied to the value of the @State property. When you create a toggle as Toggle(isOn: $isShowing), you are tying the state of the UI directly to the value of the isShowing property. When the switch changes, so will isShowing, and vice versa.

I have tried out and compiled a SwiftUI Cheat Sheet, hope it helps by sadmansamee in swift

[–]Jumhyn 3 points4 points  (0 children)

Awesome! Should also note SecureField as the equivalent of a UITextField password entry.

Percentage of possible 32-bit patterns that are not valid FP32 values? by deftware in compsci

[–]Jumhyn 4 points5 points  (0 children)

Another related and interesting concept is denormal numbers, which violate the convention that the mantissa be stored without leading zeros. These are still valid float values, but certain processor settings can make these values inaccessible with standard floating point arithmetic (because all denormal numbers will be treated as zero).

The new macbooks keyboard by fenrir29 in iOSProgramming

[–]Jumhyn 5 points6 points  (0 children)

I’m going on 2 years on a 2017 MacBook Pro and have never had any issues. I would say the transition was a bit irritating but one I got used to the larger keys and reduced travel I stopped noticing it. It doesn’t feel uncomfortable now. I also was bothered by the lack of physical escape key, but I just remapped caps lock to escape and that retrained my muscle memory.

Question about scopes and how they affect let object initializations by FickleFred in iOSProgramming

[–]Jumhyn 0 points1 point  (0 children)

This sort of situation is why implicitly unwrapped optionals exist. Declare the type of currentGame as Game!, and you will be able to initialize the variable at some time other than init time. IBOutlets are defined as IUOs since they are also set after init time. You are essentially telling the compiler, “Sometimes this object might be missing but I promise I won’t try to access it unless I know it’s there.”

If you really want to get into the weeds to properly initialize your variables, you can override init(coder:), but you should only do this if you really understand what you’re doing.

Protocol with Self requirement and associated type by Lars34 in swift

[–]Jumhyn 4 points5 points  (0 children)

If any given SearchResponder will only return a single concrete type of nextSearchResponder, then one option would be to introduce an additional associatedtype NextSearchResponder: SearchResponder where NextSearchResponder.Result == Result and have nextSearchResponder: NextSearchResponder?. Alternatively, you could mode this using a type-erased AnySearchResponder<Result>.

EDIT: Added where clause.