|
sarehu posted:I know, and... we didn't make any List<int>'s. Or any List<struct>'s either. Ah right, fair enough. I'm a little surprised, just because a list of numbers is a pretty common use case. Or so I'd thought... Soricidus posted:except that anyone working with lists of integers in java who finds this to be a problem will be using one of the approximately gazillion libraries that provide memory-efficient primitive specializations of all the data structures, so it's not really a problem in practice. I didn't know that you could get such libraries - I'm not a Java person. Good to know, thanks.
|
# ? Jan 20, 2017 13:31 |
|
|
# ? May 17, 2024 02:33 |
|
QuarkJets posted:Scientists and engineers are insulated from the often-obscene costs of working with Matlab by a layer of managers who don't understand that that there are superior free alternatives for almost all of Matlab's use cases. Even if Julia was a 1:1 Matlab replacement that simply made everything run faster, you'd still be facing a ton of inertia from older engineers with Stockholm Syndrome You're absolutely right. I had a rare flaring up of misplaced optimism. We did have a pharma middle manager flip his poo poo once he got a quote for running matlab on a sizable cluster. This is from a company that will happily pay 6-digit a year license fees for a program that is completely subsumed by an R-library. (A program/company built around a bunch of FORTRAN77 routines from 1980 that somehow became "industry gold standard". Allegedly, the entire code base has a bus factor of 1: the original author.)
|
# ? Jan 20, 2017 13:36 |
|
Beef posted:(A program/company built around a bunch of FORTRAN77 routines from 1980 that somehow became "industry gold standard". Allegedly, the entire code base has a bus factor of 1: the original author.) Not a surprise. Our company now maintains a program that needs to be regularly updated with new data, is relied upon by large oil firms, and until recently was maintained by three old ex-industry guys (none of them with any formal software education afaik) from their home offices looking to retire.
|
# ? Jan 20, 2017 14:07 |
|
QuarkJets posted:Scientists and engineers are insulated from the often-obscene costs of working with Matlab by a layer of managers who don't understand that that there are superior free alternatives for almost all of Matlab's use cases. Even if Julia was a 1:1 Matlab replacement that simply made everything run faster, you'd still be facing a ton of inertia from older engineers with Stockholm Syndrome That depends on environment. Academic institutions are increasingly feeling the squeeze on funding especially in the research wings, so an academic discount might not be enough to retain MatLab users in academia.
|
# ? Jan 20, 2017 18:25 |
|
Semi-related story. My computer at work is locked down, as normal, and I can't install or upgrade software. Today I found out that my billion-dollar employer has no facility for hitting the "free upgrade" button on VMWare. They can only purchase a new license. So I now have two licenses for VMWare. I'm tempted to see how many I can collect over the course of my employment.
|
# ? Jan 20, 2017 18:40 |
|
TooMuchAbstraction posted:That depends on environment. Academic institutions are increasingly feeling the squeeze on funding especially in the research wings, so an academic discount might not be enough to retain MatLab users in academia. Maybe, but it seems like whenever I talk to a Matlab user in academia I just hear the same excuses that we have in industry: too much legacy code (various conversion tools are quite good), "it's a good prototyping language" (except it often isn't), it's used everywhere in industry (because dumbfucks like you are afraid of change!) I know exactly one professor who is actually switching to something else (Python) and that was only because of the slimy way in which MathWorks tries to extort more money out of users who want to run their parallelized code to a supercomputer. No no no, the parallel computing toolbox isn't for serious parallel computing, that costs extra (we can't tell you how much extra until you tell us how much you can afford to spend) The silver lining to this cloud is that I don't know a single dedicated Matlab user under 35; they all use Python or R for most things and only resort to using Matlab when it's absolutely necessary (aka the PM is a dedicated Matlab user).
|
# ? Jan 20, 2017 23:52 |
San Diego State is switching it's whole math program over from MATLAB Python. So it is happening, one department at a time.
|
|
# ? Jan 20, 2017 23:59 |
|
QuarkJets posted:Maybe, but it seems like whenever I talk to a Matlab user in academia I just hear the same excuses that we have in industry: too much legacy code (various conversion tools are quite good), "it's a good prototyping language" (except it often isn't), it's used everywhere in industry (because dumbfucks like you are afraid of change!) I talked to someone who uses matlab for trading, and he said that it's very convenient for that purpose, if only he didn't have to call mathworks every time their poo poo fucks up, which it apparently does all the time. I think he switched to using java. I used matlab for like one semester of school a long time ago and now I forget it exists ...
|
# ? Jan 21, 2017 00:11 |
|
Yeah, and I know MIT switched from Matlab years ago. Things really are getting better, objectively, I'm just salty that my ring of older colleagues is so stubbornly entrenched
|
# ? Jan 21, 2017 01:56 |
|
Juliachat: I'm on day 2 of porting/redesigning a program from Python to Julia! It's a video processing thing where you shove about 30GB of video in one end and descriptions of objects comes out the other. Our reasons for switching were mostly driven by performance and python multiprocessing being a trainwreck. Julia added some inter-process queues in its last release that are good enough for easy IPC producer-consumer stuff and that's all we needed for synchronization. There's the start of a multithreading module, but it didn't have that many features last time I looked at it. We did a bunch of Numba stuff in the python implementation, but it ended up being super annoying because you were basically always programming in the super striped down python numba supported, so in practice it was clunkier than even something like C++ (no vectors, no structs, no nested arrays, ...)
|
# ? Jan 21, 2017 07:04 |
|
code:
These chunks are in multiple places.
|
# ? Jan 21, 2017 07:31 |
|
I just had some fun dealing with cargo cult programming in PowerShell. One of my co-workers asked me for help with something he was working on -- he needed to load a list of connection strings from a JSON file and update/create the connection strings in an Azure Web App. Now, PowerShell has some horrors around types and I don't fault anyone who's not familiar with the horror who gets tripped up by it. But the logic was clearly the result of getting errors, googling them, and blindly copying code from Stack Overflow that made that error go away. Old logic: - Load the list of connection strings from disk into memory - Use ConvertFrom-Json to turn the JSON into a PSCustomObject. - Convert the PSCustomObject into an associative array - Get the list of current connection strings from Azure. Azure PowerShell "conveniently" converts the JSON result into a PSCustomObject, which is just an anonymous type. Properties are attached to the object, not stored in a key/value pair or anything like that. So if you had a connection string "a", you'd be able to access it as $result.a, but not as $result['a']. - Copy the connection strings from Azure into a new PSCustomObject - Iterate over associative array containing the new connection strings and build in-memory JSON via string concatenation - Convert that JSON to a PSCustomObject - Attempt to attach the PSCustomObject to the associative array - Convert the associative array back to JSON - REST call to the Azure API to store the connection strings Those last few steps would never have worked, the data structures weren't equivalent and building JSON via string concatenation when the language has first-class support for converting things to/from JSON is insane. I rewrote it as follows: - Load the list of connection strings from disk into memory - Use ConvertFrom-Json to turn the JSON into a PSCustomObject. - Get the list of connection strings from Azure as a PSCustomObject - Iterate over the list from disk, if the property exists on the object from Azure update it, if it doesn't, add it - Convert the object back to JSON - REST call to the Azure API to store the connection strings
|
# ? Jan 21, 2017 16:23 |
|
|
# ? Jan 23, 2017 16:19 |
|
|
# ? Jan 23, 2017 16:58 |
|
|
# ? Jan 23, 2017 18:18 |
|
https://www.mathworks.com/help/matlab/ref/cumtrapz.html?requestedDomain=www.mathworks.com
|
# ? Jan 23, 2017 18:23 |
|
Food $200 Data $150 Rent $800 Cum $3,600 Utility $150 someone who is good at the economy please help me budget this. my family is dying
|
# ? Jan 23, 2017 19:16 |
|
Clearly the post was about the uncapitolized To. Get your minds out of the gutter.
|
# ? Jan 23, 2017 19:20 |
|
Meat Beat Agent posted:Food $200 stop spending so much on cum
|
# ? Jan 23, 2017 20:46 |
|
Pollyanna posted:stop spending so much on cum He's a cattle farmer, that'll just make things worse.
|
# ? Jan 24, 2017 01:45 |
|
Pollyanna posted:stop spending so much on cum no
|
# ? Jan 24, 2017 16:06 |
|
I have some contractors building a javascript frontend for a Project that I'm working on. I recently had a look at what they had produced so far, and it definitely made me laugh (or cry). It had: - methods called setX(param) which looked exactly like setter methods but actually just did a http GET request - around 50 unit tests, most of which basically just tested if if the javascript `=` operator works correctly (literally they just just asserted that a value was unchanged after assigning it to a variable) - new and innovative ways of writing for-loops: I rewrote all of their javascript code (and ported it to typsecript) and took away their repo access permissions. They now have to do pull requests.
|
# ? Jan 26, 2017 22:18 |
|
code:
note: this guy has probably been coding for decades, even if he's only used javascript briefly over the last year edit: HE DID IT TWICE Tweak fucked around with this message at 03:02 on Jan 27, 2017 |
# ? Jan 27, 2017 02:56 |
|
Tweak posted:
Just delete everything but the stuff inside the else and move on. You probably have better things to get upset over.
|
# ? Jan 27, 2017 11:48 |
|
leper khan posted:Just delete everything but the stuff inside the else and move on. You probably have better things to get upset over. You mean everything but the stuff inside the `if`? `vm.dimension.error` will always be `false`.
|
# ? Jan 27, 2017 12:27 |
|
Your IDE should really complain about that.
|
# ? Jan 27, 2017 13:37 |
Something tells me his javascript IDE is Notepad++
|
|
# ? Jan 27, 2017 15:41 |
|
yes intellij (the IDE we both use) highlights it and says it can be simplified to vm.dimension.error = false;
|
# ? Jan 27, 2017 17:36 |
|
I refuse to believe this is real. http://thedailywtf.com/articles/the-inner-json-effect No one would be that stupid, right? Right?
|
# ? Jan 31, 2017 20:30 |
|
I did some contracting work on a system which was depressingly similar to that except everything was stored in salesforce rather than svn.
|
# ? Jan 31, 2017 20:57 |
|
Aren't they all stdh.txt for programmers?
|
# ? Jan 31, 2017 21:39 |
|
Someone should point the puppet people that came up with r10k to that article. (yes I know r10k is actually reasonable but the parallels are definitely there)
|
# ? Jan 31, 2017 22:00 |
|
Carbon dioxide posted:I refuse to believe this is real. Powaqoatse posted:Aren't they all stdh.txt for programmers? I haven't recently read any of the daily wtf's articles besides this one. But the thing is, no matter how much they exaggerate, I totally believe that those stories could happen, unlike most stdh.txt
|
# ? Jan 31, 2017 22:11 |
|
Hardware horror: Another team accidentally sent out a bitwise-inverted ROM image to be etched into silicon. Unsurprisingly it can't boot. See you in three months!
|
# ? Jan 31, 2017 22:12 |
|
Spatial posted:Hardware horror: Another team accidentally sent out a bitwise-inverted ROM image to be etched into silicon. Unsurprisingly it can't boot. See you in three months! Owned lmao Guess someone is not getting a bonus
|
# ? Jan 31, 2017 22:13 |
|
dougdrums posted:I haven't recently read any of the daily wtf's articles besides this one. But the thing is, no matter how much they exaggerate, I totally believe that those stories could happen, unlike most stdh.txt
|
# ? Jan 31, 2017 22:44 |
|
A while back I spent maybe 8-12 hours over the course of a week on a converter that would take JSON put into a REST endpoint and map it into an instance of a dynamically chosen class in Java. I even got it to work in some preliminary testing. I scrapped it because I was then serializing the object into JSON and storing it in Mongo. In my partial defense, the theoretical goal was to allow the manipulation of the object before storing it but that use case was pushed far off to the side. ThisIsNoZaku fucked around with this message at 00:14 on Feb 1, 2017 |
# ? Feb 1, 2017 00:11 |
|
Spatial posted:Hardware horror: Another team accidentally sent out a bitwise-inverted ROM image to be etched into silicon. Unsurprisingly it can't boot. See you in three months! I'm a hardware imbecile. Is this something that is in any way easy to do by accident? Is it like a t-shirt where I have to print it out backwards so it transfers on forwards?
|
# ? Feb 1, 2017 00:12 |
|
pokeyman posted:I'm a hardware imbecile. Is this something that is in any way easy to do by accident? Is it like a t-shirt where I have to print it out backwards so it transfers on forwards? It's a very easy mistake to catch. They should've compared hashes of the original ROM binary versus the output image, and they also should've confirmed the final output with the firmware team who wrote it. Any firmware guy will instantly see that it's hosed because the first four bytes of the ROM are the address of the first instruction to execute. Normally it would be 0x0000xxxx. If it's some wacko address like 0xFFFFFFBF you know the train is off the tracks well before it leaves the station. But nobody checked. This isn't the first time. A while back someone sent out a completely blank ROM because they used the wrong input file and never checked the output. Pretty obviously wrong if it's all zeroes. Again, even just looking at the first four bytes would've revealed that error because all-zero isn't a valid reset vector. Not only is this kind of thing hugely embarrassing, it also costs six figures!
|
# ? Feb 1, 2017 00:41 |
|
|
# ? May 17, 2024 02:33 |
|
Ahaha that's amazing! Thanks for explaining.
|
# ? Feb 1, 2017 01:09 |