|
cis autodrag posted:so, uh, does anybody have any "do this programming interview question as a mumps horror" requests before i lose access to a mumps runtime forever? feeling bored mumps interpreter in mumps
|
# ? Jun 21, 2017 02:41 |
|
|
# ? May 25, 2024 15:23 |
|
Elysiume posted:is this like a code golf thing where you try to write something in as few bytes as possible or is this just how mumps looks its obtuse in purpose. i get off on really obtuse abuse of the x command. all the keywords can be written as one letter or full words but general style is to use the single letters since other mumps programmer cam read it.
|
# ? Jun 21, 2017 02:57 |
|
Share Bear posted:i both don't understand what problem it is solving (generic objects? not using interfaces?), nor the solution itself (PortletApplicationContext.HelpController1), mainly because I have never had to solve that problem have you ever done a sort with a custom comparer
|
# ? Jun 21, 2017 03:42 |
|
cis autodrag posted:its obtuse in purpose. i get off on really obtuse abuse of the x command. all the keywords can be written as one letter or full words but general style is to use the single letters since other mumps programmer cam read it. does it have to be the correct word, or just start with the letter?
|
# ? Jun 21, 2017 05:32 |
|
where did i do this as an interview question. dropbox?
|
# ? Jun 21, 2017 05:35 |
|
leper khan posted:does it have to be the correct word, or just start with the letter? it's specific letters. here's a list: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_COMMANDS keep in mind that a bunch of those (like try and catch) aren't mumps but cache specific language extensions so a lot of shops dont use them for portability reasons. for example the console print command is either "write" or "w" and also note that you can do that keywords are case insensitive. "x" is the "xecute" command, which as you might guess from my code snippet is akin to eval in p-langs. the @ operator you see in the second string is the indirection command, which substitutes the @varName for whatever code is in varName, so basically a different flavor of eval-ish behavior. each has its own quirks and in modern code it is generally frowned upon to use them unless there's no other way. an example of a thing that is just stuck using @ is a job queue. a queue in mumps is just gonna b a 1-d b-tree with a list of jobs to run and since there's no such thing as a function pointer or the like, you'd do something like this for your queue: code:
|
# ? Jun 21, 2017 05:56 |
|
Are you expected to do this on a white board or what?
|
# ? Jun 21, 2017 06:54 |
Wheany posted:Are you expected to do this on a white board or what? No idea. I've never actually had a programming interview, since I'm still in grad school (for astrophysics). Mostly I've just seen this problem because of this tweet https://mobile.twitter.com/paf31/status/805951805293088768 and its associated gist which are collectively very cool.
|
|
# ? Jun 21, 2017 09:12 |
|
VikingofRock posted:No idea. I've never actually had a programming interview, since I'm still in grad school (for astrophysics). Mostly I've just seen this problem because of this tweet https://mobile.twitter.com/paf31/status/805951805293088768 and its associated gist which are collectively very cool. VikingofRock posted:No idea. I've never actually had a programming interview, since I'm still in grad school (for astrophysics). Mostly I've just seen this problem because of this tweet https://mobile.twitter.com/paf31/status/805951805293088768 and its associated gist which are collectively very cool. nice seven-line "one liner"
|
# ? Jun 21, 2017 10:13 |
|
Asymmetrikon posted:all dependency injection is is "passing dependencies through the constructor/properties instead of constructing them inside the object." spring is a lot more than dependency injection, and you don't need a framework to do DI raminasi posted:have you ever done a sort with a custom comparer OK I understand the first part, the second part is "I'm not sure why you would do this versus declaring an interface", because I assume that anything that gets set as a dependency at runtime still has to adhere to an object type or interface I get that it is like a lambda, but the object instance should still expect an interface which is defined, rather than just a function? Or that lambdas also have types and the type would be the object instance and that's it?
|
# ? Jun 21, 2017 16:09 |
|
w/ spring you can intercept a call to a method on an interface and handle it with whatever code you want. so instead of an object that fully implements an interface, you could have an object for each method in the interface and spring creates a proxy that acts like the interface, but behind the scenes redirects to the object responsible for each method. this is very useful for things like mybatis-spring which allows you to create a proxy for an interface that sends the method calls to a mybatis translation layer which calls a sql statement using the inputs of the method and then returns the results of the statement as the return type defined in the interface method.
|
# ? Jun 21, 2017 16:34 |
|
Share Bear posted:OK I understand the first part, the second part is "I'm not sure why you would do this versus declaring an interface", because I assume that anything that gets set as a dependency at runtime still has to adhere to an object type or interface there's no "versus declaring an interface," capital letter DI as such relies heavily on interfaces. if a lambda is a single anonymous function, an interface is a named collection of one or more functions. and if you always want to pass the same set of functions in (outside of e.g. a testing environment) you do it at object construction. and if you don't want to do all the boilerplate yourself you do it with a framework.
|
# ? Jun 21, 2017 16:49 |
|
Shaggar posted:w/ spring you can intercept a call to a method on an interface and handle it with whatever code you want. so instead of an object that fully implements an interface, you could have an object for each method in the interface and spring creates a proxy that acts like the interface, but behind the scenes redirects to the object responsible for each method. tfw you refuse to just write a loving method
|
# ? Jun 21, 2017 16:51 |
|
Share Bear posted:OK I understand the first part, the second part is "I'm not sure why you would do this versus declaring an interface", because I assume that anything that gets set as a dependency at runtime still has to adhere to an object type or interface dependency injection is just a piece of code that calls all your constructors for you you write all of your constructors to take interfaces, then your DI thinger figures out whether you want a real Butt for your IFartable or a FakeButt IFartable depending on whether you're in your test harness or not
|
# ? Jun 21, 2017 17:02 |
|
VikingofRock posted:No idea. I've never actually had a programming interview, since I'm still in grad school (for astrophysics). Mostly I've just seen this problem because of this tweet https://mobile.twitter.com/paf31/status/805951805293088768 and its associated gist which are collectively very cool.
|
# ? Jun 21, 2017 17:15 |
|
Cocoa Crispies posted:tfw you refuse to just write a loving method mybatis spring is great and one of the few legitimate uses of that kind of spring voodoo
|
# ? Jun 21, 2017 17:20 |
|
Shaggar posted:mybatis spring is great and one of the few legitimate uses of that kind of spring voodoo mybating furiously
|
# ? Jun 21, 2017 17:39 |
JawnV6 posted:does this meet the one-pass option/requirement though? like how could you even tell My understanding is that this passes over the list once, but builds up an O(N^2) structure of thunks to evaluate the maxes in each direction. So it's not particularly efficient, but it is a neat use of the Tardis monad.
|
|
# ? Jun 21, 2017 17:59 |
|
Shaggar posted:w/ spring you can intercept a call to a method on an interface and handle it with whatever code you want. so instead of an object that fully implements an interface, you could have an object for each method in the interface and spring creates a proxy that acts like the interface, but behind the scenes redirects to the object responsible for each method. raminasi posted:there's no "versus declaring an interface," capital letter DI as such relies heavily on interfaces. if a lambda is a single anonymous function, an interface is a named collection of one or more functions. and if you always want to pass the same set of functions in (outside of e.g. a testing environment) you do it at object construction. and if you don't want to do all the boilerplate yourself you do it with a framework. Arcsech posted:dependency injection is just a piece of code that calls all your constructors for you Thank you all very much for your assistance with my very terrible programmer question, it has been extremely helpful for understanding this mess.
|
# ? Jun 21, 2017 21:02 |
|
downloaded vscode and am playing around with reactjs, redux, babel, polyfills and all that fun stuff. how do you do, fellow kids
|
# ? Jun 21, 2017 22:40 |
|
you can get full vs community for free too if you're using it for personal stuff.
|
# ? Jun 21, 2017 23:07 |
|
i have no words they programmed a chemistry set programmable in brainfuck into space station 13 how the gently caress did they do that with BYOND???
|
# ? Jun 21, 2017 23:18 |
|
Luigi Thirty posted:i have no words my first thought on seeing that was to figure out a DSL in Lisp or Scheme that could generate said brainfuck
|
# ? Jun 22, 2017 00:10 |
|
eschaton posted:my first thought on seeing that was to figure out a DSL in Lisp or Scheme that could generate said brainfuck new project: write a lisp in the lovely BYOND scripting language? I found the source for the brainfuck interpreter in their github
|
# ? Jun 22, 2017 00:41 |
|
terrible programmers: the horror from BYOND
|
# ? Jun 22, 2017 00:51 |
|
ctps: quote:com.mongodb.MongoQueryException: Query failed with error code 96 and error message 'Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit. web scale
|
# ? Jun 22, 2017 00:59 |
|
MALE SHOEGAZE posted:ctps: we have run into this exact problem our solution was just to fetch the entire collection into memory and sort it in java god mongo is such a piece of poo poo
|
# ? Jun 22, 2017 01:03 |
|
how would you ever use that much ram in your hobby project?
|
# ? Jun 22, 2017 01:12 |
|
no one will ever want to sort more than 32 megs of data
|
# ? Jun 22, 2017 01:44 |
|
this error is occurring when attempting to sort less than 1000 things
|
# ? Jun 22, 2017 02:34 |
|
lmao
|
# ? Jun 22, 2017 02:49 |
|
Jabor posted:no one will ever want to sort more than 32 megs of data I thought about reading the number more carefully but decided against it
|
# ? Jun 22, 2017 02:49 |
|
today i learned that sql server will straight up tell you if you're missing an index. microsoft is good.
|
# ? Jun 22, 2017 02:55 |
|
sure, but instead you could pay nothing for postgres, and hire me to tell you when you need an index. then the money goes to me, instead of microsoft! my rate is half what you're paying them. it's win win folks
|
# ? Jun 22, 2017 03:56 |
|
jony neuemonic posted:today i learned that sql server will straight up tell you if you're missing an index. microsoft is good. SQL is so good already and MS SQL is basically the real-life equivalent of the joke about how the only way to improve it would be if it rubbed your nipples and gave you a blowjob. ThePeavstenator fucked around with this message at 15:00 on Jun 22, 2017 |
# ? Jun 22, 2017 04:57 |
|
my company is using dynamodb for an internal CRUD app (w/ very low perf need, just manual users) that just associates one kind of id to many of another kind of id. for the reverse of that lookup there's an offline process to generate a 2nd collection the lead architect said dynamo is a good choice because then we don't have to manage the db this is a company that runs a bunch of mssql instances in house already btw
|
# ? Jun 22, 2017 14:49 |
|
I was doing some googling and so thanks thread!
|
# ? Jun 22, 2017 15:06 |
|
Luigi Thirty posted:i have no words fuckin lmao that is amazing
|
# ? Jun 22, 2017 15:07 |
|
Flat Daddy posted:the lead architect said dynamo is a good choice because then we don't have to manage the db this is true tho all things in moderation of course, but if i can assign 'be in charge of stateful thing' to a money motivated team of experts that seems p dece for me suddenly not having to do that
|
# ? Jun 22, 2017 15:31 |
|
|
# ? May 25, 2024 15:23 |
|
are you cool if i use one of the solutions in the comments as a basis for starting the mumps version? with all these house showings i most def don't have time to solve it from scratch since it's not a problem i've done before.
|
# ? Jun 22, 2017 15:50 |