|
Sagacity posted:"Ooh, we had such a lovely honeymoon on {C65C4E6B-7D7A-4F38-8305-0D4C90776202}" mongolia actually did this for their postal system https://qz.com/705273/mongolia-is-changing-all-its-addresses-to-three-word-phrases/
|
![]() |
|
![]()
|
# ? Feb 17, 2025 11:12 |
Powerful Two-Hander posted:one of our terrible databases lets you choose a city and a state separately despite the two being directly related in the reference tables so you constantly get stupid poo poo like one person seeing "Paris, Paris, France" and another seeing "Paris, Texas, USA" depending on how they queried it yeah this is usually a poo poo show, with the surprising exception of kazakhstan. their most recent postal code system slaps unique identifier on each building, which owns extremely
|
|
![]() |
|
every mailbox in the us has a unique id that's zip+someid
|
![]() |
|
Lutha Mahtin posted:mongolia actually did this for their postal system this owns edit: quote:Stade de France is at reporter.smoker.received. smokah's French vacation
|
![]() |
|
Shaggar posted:every mailbox in the us has a unique id that's zip+someid Edit: Never mind, you're talking about an 11 digit code that includes the zip+4. mystes fucked around with this message at 20:06 on Mar 19, 2019 |
![]() |
|
the +4 digits don't correspond to anything specific, they could be a city block, a single building, or a single high volume recipient. USPS does have a barcode format that specifies the exact delivery point
|
![]() |
|
This android thing we develop for at work has a bunch of classes split into a view, presenter and an interface class connecting them. Also a bunch of @Inject all over from some dependency injection library/framework. Not a big fan of it because it makes following the actual control flow weird and time consuming
|
![]() |
|
developers be writing softed wares
|
![]() |
|
oh also none of those interfaces have more than one concrete implementation, since each one only gets used between the closely-related view and presenter classes. All the code uses the abstract interface type to call with though for whatever reason
|
![]() |
|
brand engager posted:oh also none of those interfaces have more than one concrete implementation, since each one only gets used between the closely-related view and presenter classes. All the code uses the abstract interface type to call with though for whatever reason this is actually really good for cutting down on circular dependencies. which doesn't sound important at the toy-app stage, but being able to only compile stuff you've changed instead of having to build the world every time is pretty important once your app is sizeable
|
![]() |
raminasi posted:i literally could not function without a comprehensible history graph, especially when prototyping new stuff. like this is not too uncommon: I just started working somewhere that uses perforce and I'm having trouble squaring it with this kind of work flow. E.g. today I was writing some tests when I noticed that some existing code was broken, and then it turned out that the fix strongly suggested a small refactor. In git I would split that into 3-ish commits (something like fix + add tests for bug, refactor, add new tests). I'm not sure what the "right" perforce workflow is, though. Should I be splitting this work into multiple workspaces? Are large changelists just considered more acceptable?
|
|
![]() |
|
VikingofRock posted:I just started working somewhere that uses perforce and I'm having trouble squaring it with this kind of work flow. E.g. today I was writing some tests when I noticed that some existing code was broken, and then it turned out that the fix strongly suggested a small refactor. In git I would split that into 3-ish commits (something like fix + add tests for bug, refactor, add new tests). I'm not sure what the "right" perforce workflow is, though. Should I be splitting this work into multiple workspaces? Are large changelists just considered more acceptable? Not sure if I understand you perfectly, but I believe what I would do for that would be create a new Task stream off of your Development ("master") stream, then make three change-lists for each "commit". I see no reason for using additional workplaces, however when I was using Perforce we used workspaces VERY conservatively, so most of my knowledge comes from only using one workspace.
|
![]() |
|
I'm making a twitter app. All calls to twitter have to include both app credentials and user credentials (if you're acting on behalf if a user). This is fine when I'm running it on my own comp, and would be fine with a server model where the user clicks an oauth thing on my page, gives me their user creds and I make the requests. However let's say I wanted to make it clientside. The trouble is, whether I did it via a script on a page or via a browser plugin, some user would be able to access the app creds and then flaunt their rate limit to get the app banned. Is there a way to solve this? There are other browser plugins that block people on twitter, I wonder how they handle this.
|
![]() |
|
gonadic io posted:I'm making a twitter app. All calls to twitter have to include both app credentials and user credentials (if you're acting on behalf if a user). route the twitter calls from the client through your own server/web app/whatever
|
![]() |
|
VikingofRock posted:I just started working somewhere that uses perforce and I'm having trouble squaring it with this kind of work flow. E.g. today I was writing some tests when I noticed that some existing code was broken, and then it turned out that the fix strongly suggested a small refactor. In git I would split that into 3-ish commits (something like fix + add tests for bug, refactor, add new tests). I'm not sure what the "right" perforce workflow is, though. Should I be splitting this work into multiple workspaces? Are large changelists just considered more acceptable? def not multiple workspaces, unless your depot is crazy small. you can't really merge stuff b/w workspaces like pseudorandom said if you can split them into reasonable multiple changelists, that makes code review slightly easier. otherwise, dehumanize yourself and face to cvs, basically.
|
![]() |
Boiled Water posted:i wasn't laughed until now my favourite code comment in this company was “who coded this?”
|
|
![]() |
|
DaTroof posted:route the twitter calls from the client through your own server/web app/whatever Not much point having anything clientside if I do this. Maybe that's just how it has got to be
|
![]() |
pseudorandom posted:Not sure if I understand you perfectly, but I believe what I would do for that would be create a new Task stream off of your Development ("master") stream, then make three change-lists for each "commit". I guess my more general problem is what do I do if I start working on feature B, and then I realize that it depends on feature A which is unimplemented and in the same file? Is it possible to submit the two features as two separate changelists, without throwing away my work on feature B? Sorry if I'm getting some of the terminology wrong or overlooking something obvious; I've only been working with perforce for about a week.
|
|
![]() |
|
VikingofRock posted:I guess my more general problem is what do I do if I start working on feature B, and then I realize that it depends on feature A which is unimplemented and in the same file? Is it possible to submit the two features as two separate changelists, without throwing away my work on feature B? Best advice I can give is get used to throwing work away, and consider it ammunition for meetings to come.
|
![]() |
|
gonadic io posted:Not much point having anything clientside if I do this. Maybe that's just how it has got to be Related to that, does anybody have some advice for how to accept work from users without being overloaded? I have e.g., a limit of 100 concurrent users and see when (if) I get there what the server load looks like? I'm on a free tier gcp machine so I don't think I need to be too worried about cost.
|
![]() |
|
gonadic io posted:Related to that, does anybody have some advice for how to accept work from users without being overloaded? I have e.g., a limit of 100 concurrent users and see when (if) I get there what the server load looks like? I'm on a free tier gcp machine so I don't think I need to be too worried about cost. The workload should be almost entirely network throughput limited if you are simply proxying requests and responses. I'd expect even a free tier box to handle 100 concurrent users just fine as long as there's enough network throughput available. edit: The free tier GCP instance are limited to 1GB of egress data a month. That may be a factor. necrotic fucked around with this message at 16:32 on Mar 20, 2019 |
![]() |
|
Came across something I hadn't see before. A Github repo for a Vue component, nothing exciting there. Standard readme and a total stranger has created a PR with a Code Review making changes to camel case stuff etc. What kinda weirdo goes around code reviewing strangers libraries?
|
![]() |
|
necrotic posted:The workload should be almost entirely network throughput limited if you are simply proxying requests and responses. I'd expect even a free tier box to handle 100 concurrent users just fine as long as there's enough network throughput available. Hmm noted. It's just a few calls to twitter with no body per user, so maybe a KB or two including the headers. I'll just start slow and see how my usage looks like. Thanks for the advice
|
![]() |
|
Aramoro posted:Came across something I hadn't see before. A Github repo for a Vue component, nothing exciting there. Standard readme and a total stranger has created a PR with a Code Review making changes to camel case stuff etc. What kinda weirdo goes around code reviewing strangers libraries? Last time I asked a SO question about rust, somebody driveby edited my post only converting "rust" to "Rust"
|
![]() |
|
![]() https://github.com/massgov/DOT when you don't trust your contractors so you host parts of your government website on github's free hosting
|
![]() |
|
VikingofRock posted:I guess my more general problem is what do I do if I start working on feature B, and then I realize that it depends on feature A which is unimplemented and in the same file? Is it possible to submit the two features as two separate changelists, without throwing away my work on feature B? Shelve the feature B change list, work on feature A and submit it when done. Unshelve feature B, resolve any merge conflicts from A, and continue working on B. This is similar to the git stash feature. It'll save the edits you've made in the B change list, but revert the on-disk file back to the unchanged state. You can then check out that file in the Feature A change list and make any edits you'd like. Once you've submitted A, unshelving will bring back the saved edits so you can continue working on B. gonadic io posted:I'm making a twitter app. All calls to twitter have to include both app credentials and user credentials (if you're acting on behalf if a user). Does Twitter not have something similar to public app key + private app secret? If I'm reading the Twitter docs right, they give you an "access token" and an "access token secret"; if the APIs you wish to access only require the "access token", which I'm assuming is safe to put in a public client, then you should be safe to publish that. pseudorandom fucked around with this message at 17:29 on Mar 20, 2019 |
![]() |
|
pseudorandom posted:Does Twitter not have something similar to public app key + private app secret? If I'm reading the Twitter docs right, they give you an "access token" and an "access token secret"; if the APIs you wish to access only require the "access token", which I'm assuming is safe to put in a public client, then you should be safe to publish that. Hmmmm actually I think you're right. The app secret is not actually put in the request, but is encrypted and then put there. So I think that means I can have the clients request a token valid only for their request. I hadn't noticed this before because the library I'm using was abstracting this away. I think I can still do most of the calls client side, and only provide then tokens from the server. Great I'll give that a go! My source is https://developer.twitter.com/en/docs/basics/authentication/guides/authorizing-a-request
|
![]() |
|
Aramoro posted:Came across something I hadn't see before. A Github repo for a Vue component, nothing exciting there. Standard readme and a total stranger has created a PR with a Code Review making changes to camel case stuff etc. What kinda weirdo goes around code reviewing strangers libraries? I regularly revert edits to a fairly highly voted answer of mine on stack overflow that are exactly that I even followed the languages style guide from the documentation
|
![]() |
|
Aramoro posted:Came across something I hadn't see before. A Github repo for a Vue component, nothing exciting there. Standard readme and a total stranger has created a PR with a Code Review making changes to camel case stuff etc. What kinda weirdo goes around code reviewing strangers libraries? People looking to pad a CV with worthless crap
|
![]() |
|
AggressivelyStupid posted:I regularly revert edits to a fairly highly voted answer of mine on stack overflow that are exactly that how do other users edit snack on overflow posts? wouldn’t they need to be an admin?
|
![]() |
|
you just need enough reputation and you can do stuff https://stackoverflow.com/help/privileges
|
![]() |
pseudorandom posted:Shelve the feature B change list, work on feature A and submit it when done. Unshelve feature B, resolve any merge conflicts from A, and continue working on B. This is exactly what I was looking for; thanks. I had totally missed the shelve command.
|
|
![]() |
|
Lutha Mahtin posted:wales is actually a country tho lol It's about as much a country as say Texas. Hell Texas has more powers over stuff like taxation than Wales does.
|
![]() |
|
wales, Scotland, etc.. are more like counties than states.
|
![]() |
|
code:
That will surely not break things in the future! ![]()
|
![]() |
|
Shaggar posted:wales, Scotland, etc.. are more like counties than states. ![]()
|
![]() |
|
brand engager posted:This android thing we develop for at work has a bunch of classes split into a view, presenter and an interface class connecting them. Also a bunch of @Inject all over from some dependency injection library/framework. Not a big fan of it because it makes following the actual control flow weird and time consuming brand engager posted:oh also none of those interfaces have more than one concrete implementation, since each one only gets used between the closely-related view and presenter classes. All the code uses the abstract interface type to call with though for whatever reason is this the first time you've encountered an inversion-of-control MVC framework? i had a similar reaction when i first tried to learn android but it makes more sense the more you read about how apps work in android. either way it's how the android API is structured so you will pretty much have to learn to live with it the dependency injection stuff, it depends on a number of factors whether it is good or not (i don't have a lot of experience with this). there are a lot of valid reasons for an android app to use one but again it depends on the specifics
|
![]() |
|
ratbert90 posted:
idgi but i feel like i should
|
![]() |
|
Corla Plankun posted:idgi but i feel like i should The requirements.txt file is hard coding version requirements. which will break things in the future very easily. Also there’s no reason to hard code those versions.
|
![]() |
|
![]()
|
# ? Feb 17, 2025 11:12 |
|
setting specific versions for libraries is pretty normal and allows you to build the same thing again reliably. allowing any version can introduce unexpected changes in functionality
|
![]() |