|
gonadic io posted:god VBA is such a piece of poo poo if multiple capitalizations of a keyword / variable name exist in a project, the occurence in the first module (alphabetically) changes all the others to match. Its a lot of fun if you're the special kind of retard who uses VBA with a bespoke source code export excel addin so you can use source control and then suddenly all your files are modified.
|
# ? Mar 4, 2015 18:24 |
|
|
# ? May 25, 2024 13:09 |
|
Notorious b.s.d. posted:i was always told not to rely on finalizers in java, because they might not run that is still good advice in swift, which like pretty much every other language doesn't guarantee finalization during program exit. also, as subjunctive says, the exact moment of finalization is still hard to predict when the object's life has been at all complicated but immediate reclamation is really important to us, not just for performance, but because we're a hybrid-managed environment. in many languages, all memory is managed by the language implementation; at most, you have some class with a c pointer in some private native field whose value is never ever exposed to the language. swift, like objc, and like a few other languages, does not have this property, because by design we sit right on top of c and can directly interoperate with it. if a managed object ever owns an unmanaged pointer, guess what, you have a serious problem, because memory management generally assumes that you can manage allocations separately, and so it will happily reclaim objects that own unmanaged pointers that you're still working with this was one of the serious problems with objc gc. a lot of objc classes own unmanaged memory, e.g. NSString owning a character buffer, because it's more efficient and because they were written that way twenty years ago. imagine some method on NSString that just pulls the character buffer out of the string object, then starts working with it to, i dunno, count the grapheme clusters or something. on x86-64, self is passed in %rdi. if the compiler spills that to the stack, you don't have a bug. if the compiler loads the buffer pointer into %rax, you don't have a bug. if the compiler loads the buffer pointer into %rdi, and that was the last reference to the object, and there happens to be a gc at exactly the wrong time, guess what, you have a bug. good luck reproducing that once you find the bug, there's a lot of things you can do; i think c# programmers have a similar problem when they're heavily pinvoking and can use "using" for it maybe? the problem is finding it at all so having an implementation model that makes finalization more predictable, even if it's not exactly fully predictable, makes it far more likely that these problems show up in development and testing
|
# ? Mar 4, 2015 19:42 |
|
say you're building an all-in-one jar with maven. can you add something to the pom so that you get an additional maven goal to execute the jar after it's been built?
|
# ? Mar 4, 2015 19:56 |
|
gonadic io posted:god VBA is such a piece of poo poo You know that there is a template in visual studio for a vsto project so that you can write everything in c#?
|
# ? Mar 4, 2015 20:03 |
|
The excel api is still utter garbage though, check out msoTriState
|
# ? Mar 4, 2015 20:04 |
|
pointsofdata posted:The excel api is still utter garbage though, check out msoTriState only microsoft could come up with a tristate with the states true, false and unsupported
|
# ? Mar 4, 2015 20:07 |
|
prefect posted:say you're building an all-in-one jar with maven. can you add something to the pom so that you get an additional maven goal to execute the jar after it's been built? you can run multiple phases and goals in order ex: clean package install would clean ur build dir, build and package the project, and then install it in your local cache. so if your execute goal is exec:jar, you might could do clean package exec:jar. alternatively if you want it to always execute the jar after a certain phase (u probably don't want this) in the pom in the plugin definition for the execute plugin you'd have something like XML code:
more info: http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Configuring_Build_Plugins
|
# ? Mar 4, 2015 20:07 |
|
Shaggar posted:you can run multiple phases and goals in order ex: clean package install would clean ur build dir, build and package the project, and then install it in your local cache. so if your execute goal is exec:jar, you might could do clean package exec:jar. this is the kind of behavior i want. "exec" isn't one of the standard lifecycle goals -- am i correct in thinking it comes from the exec maven plugin?
|
# ? Mar 4, 2015 20:11 |
|
crosspost from the bitcoin thread for a completely different sort of terrible programmer https://github.com/c-darwin/dcoin/search?utf8=%E2%9C%93&q=mongoloid Aleksei Vasiliev posted:$lng['race_1'] = 'Mongoloid'; Oben posted:https://github.com/c-darwin/dcoin/blob/73941861d653c36c2fd700e9ae686e7b96d55100/img/race.gif
|
# ? Mar 4, 2015 20:28 |
|
pointsofdata posted:You know that there is a template in visual studio for a vsto project so that you can write everything in c#? that's good to know. however in this case i don't have any say over the content of the course I just answer questions in labs and mark cws. I suppose i could start telling students "in c# you could do it easily" whenever they asked me why their VBA code wasn't working but there's already enough shaggars in this world
|
# ? Mar 4, 2015 20:34 |
|
gonadic io posted:that's good to know. however in this case i don't have any say over the content of the course I just answer questions in labs and mark cws. I suppose i could start telling students "in c# you could do it easily" whenever they asked me why their VBA code wasn't working but there's already enough shaggars in this world shaggars++;
|
# ? Mar 4, 2015 21:39 |
|
prefect posted:this is the kind of behavior i want. "exec" isn't one of the standard lifecycle goals -- am i correct in thinking it comes from the exec maven plugin? yes exec is probably a plugin/goal. so there are phases and goals. the phases are set in stone and they're the common ones you see like clean build package install, etc... They are part of the maven build lifecycle. http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html Goals are tasks achieved by specific plugins. When you use goals manually you usually specify pluginname:goalname like tomcat:deploy would be the deploy goal of the tomcat plugin. Plugins can also be configured to automatically execute goals as part of certain phases. That's the executions section Plugins can also specify phases that they want to bind to internally so you don't have to attach them yourself. for example, the maven compiler plugin automatically binds its compile goals to the compile lifecycle. This is why your stuff gets compiled without you specifying any custom executions. if you're using the codehaus exec plugin then exec:exec is the exec goal of the exec plugin.
|
# ? Mar 4, 2015 21:51 |
|
jfc i surrender please opsworks just stop hurting me i can't take it anymore
|
# ? Mar 5, 2015 00:54 |
|
prefect posted:this is the kind of behavior i want. "exec" isn't one of the standard lifecycle goals -- am i correct in thinking it comes from the exec maven plugin? what are you trying to do? there's probably a better way than exec
|
# ? Mar 5, 2015 03:45 |
|
today i had one of my most productive days*. we ran out of half-caff coffee so i had to drink dark roast. i was coding like a fiend. for some reason requests on the web front-end have not been going through and yet they end up actually working on the back end. so obviously there's been a bug introduced since the last time i completely recoded that controller. i imagine it has to have something to do with the fact it's extremely slow, taking a whole 9 seconds to do one thing with just 1 user on the site. maybe it's just timing out? it can't hurt to rip out the current middle ware and replace it with one that a guy on stack overflow said i should use months ago in a totally unrelated question. one of those "why are you using that when you could use this?" remarks. so i do that, but the new super-fast middleware demands i use jQuery. and i have to use dumb jQuery stuff like .each(). and you can't use promises because as the developer says on github "the jQuery implementation of promises sucks anyway." so i end up writing about 5 functions just to deal with that mess whereas i had two before. and i began writing each function sure that i had already forgotten or never understood what i was writing the last one to do. but somehow i couldn't stop typing and it actually worked. and when all was said and done it took a full 2 seconds longer when processing the same 8 lady gaga pictures as before. so i saved it as something like "loving-hell-this-poo poo-is-slower-than-before-controller.js" and reverted to the old one. * read: busywork now i'm drinking, sorry echi
|
# ? Mar 5, 2015 07:46 |
|
Brain Candy posted:101 multithreading : don't let threads touch except where they are explicitly allowed. pick the one or two places to exchange info and touch nothing else ehh i am not sure that I am using swingworkers since it's a javafx slider. i know pretty little about both java and swing but i was under the impression that it would deal with threads so joe-java-writer can whip up some fancy UI without having to stumble through the pitfalls of becoming a good programmer. mostly just wanted to get the 'pos take on javafx and complain about being stuck in the badprogrammermatrix
|
# ? Mar 5, 2015 08:15 |
|
neo... follow the goto statement... i take another hit of computer duster as i fumble for the usb drive the client came for. i warn "that''s some pretty hardcore poo poo man" "everyone said you were the best" i wrote hack.pl the other day, every line terminated with a semicolon nice it'll probably run things probably gotta run if you wanna max out your rep in the cyberbiz the dusters starting to take effect, my limbs are starting to go numb and i start to feel higher than an arcade accountants postfix stack "you wanna party big boy?" the client's girl asks i probably shouldn't, i got a big day tomorrow presenting a paradigm breaking new node.js overhaul to the boss... until i see the tattoo on her back code:
this is it, the nagging doubts about reality are all gonna come to an end i pick up the can of duster again and take a deep inhale, that accountants arcade gets a hundred extra nooblet birthday parties toppin' up his stack "most excellent" i leave with the duo into the tv static night, baseline and duster pumping in my head Marzzle fucked around with this message at 08:53 on Mar 5, 2015 |
# ? Mar 5, 2015 08:49 |
|
Shaggar posted:yes exec is probably a plugin/goal. thanks for the excellent explanation; i will probably be copy/pasting this to a co-worker Brain Candy posted:what are you trying to do? there's probably a better way than exec there's a guy building an executable jar. he wants a super-simple way to be able to say "maven, build this jar and then run it, so i can see what it does"
|
# ? Mar 5, 2015 12:52 |
|
prefect posted:thanks for the excellent explanation; i will probably be copy/pasting this to a co-worker okay i guess i'm just used to horrible things lurking behind that sort of question
|
# ? Mar 5, 2015 14:18 |
|
Marzzle posted:ehh i am not sure that I am using swingworkers since it's a javafx slider. i know pretty little about both java and swing but i was under the impression that it would deal with threads so joe-java-writer can whip up some fancy UI without having to stumble through the pitfalls of becoming a good programmer. eh, well, you aren't http://fxexperience.com/2011/07/worker-threading-in-javafx-2-0/ but, well, the other things still apply. java makes the programmer do most of the thread management so you can't really herp-derp through it unless you are following a tutorial with a specific case
|
# ? Mar 5, 2015 14:36 |
|
use c#, c# threads are good & easy
|
# ? Mar 5, 2015 16:19 |
|
threads are at best the least bad option and i don't care what language you are talking about
|
# ? Mar 5, 2015 16:25 |
|
lol, Angular 2.0 will be targeting TypeScript now instead of their own AtScript. probably a good move in the end, but good god google's add is hilariously add
|
# ? Mar 5, 2015 18:52 |
|
so ive got an interesting coursework that is to implement a really basic system temperature conversion system using message passing, we get to use java with akka, scala with akka or erlang im gonna give scala/akka a go but holy piss is this annoying to even setup a blank project
|
# ? Mar 5, 2015 18:53 |
|
that's because scala and to a greater extent sbt are garbage you could have used erlang or elixir and probably had it done already
|
# ? Mar 5, 2015 19:00 |
|
also don't use threads in java. use something in java.util.concurrent instead. i don't really think slider change listeners should be kicking off threads or executors or whatever but if it's just a small throwaway project then who cares.
|
# ? Mar 5, 2015 19:04 |
|
triple sulk posted:that's because scala and to a greater extent sbt are garbage sulk you change language opinions every time you change jobs you're like a walking, talking copy of "7 languages in 7 weeks"
|
# ? Mar 5, 2015 19:06 |
|
Valeyard posted:so ive got an interesting coursework that is to implement a really basic system temperature conversion system using message passing, we get to use java with akka, scala with akka or erlang sbt is really bad if you don't have time to fight sbt, either use maven or let intelliJ set up the project for you
|
# ? Mar 5, 2015 19:07 |
|
Valeyard posted:so ive got an interesting coursework that is to implement a really basic system temperature conversion system using message passing, we get to use java with akka, scala with akka or erlang lol, wouldn't this have been utterly trivial with erlang? it's literally hello world for erlang.
|
# ? Mar 5, 2015 19:07 |
|
the only issue i have with erlang is...so the sy stem needs to have 5 actors. 2xsensors, 1xconverter, 1xclock and 1xprinter and they are all supposed to pass messages between them so the clock actor sends a message every 1 second to both of the sensors. but how does it know the PID of the sensor? is it ok to just spawn all these actor processes and then use the register function to name them all and make them accessable everywhere?
|
# ? Mar 5, 2015 19:36 |
|
Valeyard posted:the only issue i have with erlang is...so the sy stem needs to have 5 actors. 2xsensors, 1xconverter, 1xclock and 1xprinter and they are all supposed to pass messages between them Hello. Registering is the easiest mechanism. Register processes and off you go. This is generally the easy way out. You have a print actor, a clock actor, a converter actor, and two standalone sensors that talk to them. A different way is to have a 'control plane'. It's a bit like a coordinator that goes and starts all processes independently and pass them to each other. It could, for example, start the clock, printer, and converter, and only keep their references as a pid. The control plane then starts the two sensors passing them the pids to each of the service ({ClockPid, PrintPid, ConvertPid}). The control plane then leaves and lets the system go, or optionally hangs around, linking itself to all processes so that if anyone fails, they all get taken down. The advantage of this approach is that nothing has a name, so you can start as many sensor systems as you'd like. You can also try to mix up the approaches together -- have a clock, print and converter processes registered, but have the sensors started by a control plane. In all cases, it's good to have that kind of control plane (read: supervisor) if only because it lets you know in which order things are booted -- you don't want the sensors to ask the converter for work when the converter hasn't been setup yet, for example. In practice though, you'd convert temperatures in a function and use the VM's timer mechanisms rather than trying to implement them yourself, and would end up with 1 actor per sensor maybe.
|
# ? Mar 5, 2015 19:58 |
|
Brain Candy posted:101 multithreading : don't let threads touch except where they are explicitly allowed. pick the one or two places to exchange info and touch nothing else a quick guide to concurrency lesson one: it is really hard, so do the simplest thing that could work. usually this means not being concurrent lesson two: it's easy to run two things at the same time if they don't talk to each other much. background workers and threads are a good fit here. lesson three: using locks to build thread safe code is like using malloc to get memory safety. it's much easier to copy things between threads than share them, especially when it comes to managing lifetimes. lesson four: atomic operations are nice, like counters, compare and swap, but are just as treacherous as locks when you compose them. lesson five: if you need transactions, you probably need a database. lesson six: all of the above things will produce working, but slow code. you will want to write that before optimising it using more specialised concurrency operations.
|
# ? Mar 5, 2015 20:16 |
|
concurrency: if(embarrassingly parallel): not too bad! else: dehumanize
|
# ? Mar 5, 2015 20:20 |
|
dehumanize yourself race and condition face to
|
# ? Mar 5, 2015 20:44 |
|
more like dehumanize yo
|
# ? Mar 5, 2015 20:52 |
|
dehumanize yourself and face to Segmentation fault (core dumped)
|
# ? Mar 5, 2015 21:11 |
|
MononcQc posted:Hello. thank you! that actually all makes sense. just now I have everything registered but I think once this is working I will look into having some kind of control pane for the sensors
|
# ? Mar 5, 2015 21:43 |
|
i have wanted to do a hobby project for a while and i decided recently that i would set up the data model and database first. i've done a lot of database stuff at home and at work, but i haven't worked at a place that has a really good data setup. what are some best practices for: - versioning database code and procedures - setting up migrations with upgrades and downgrades - keeping application versions and database versions in sync or at least compatible thank you.
|
# ? Mar 6, 2015 01:34 |
|
i thought i hated selenium but i spent a bit browsing through this custom selenium driver we're using and i think i just hate the guy who wrote it
|
# ? Mar 6, 2015 02:16 |
|
|
# ? May 25, 2024 13:09 |
|
'ST posted:i have wanted to do a hobby project for a while and i decided recently that i would set up the data model and database first. lol if you need a databse
|
# ? Mar 6, 2015 02:17 |