|
http://www.aoc.nrao.edu/php/tjuerges/ALMA/ACE-5.5.2/html/ace/OS__main_8h-source.html This entire framework makes me want to fight somebody.
|
# ? Jun 9, 2016 20:42 |
|
|
# ? Jun 7, 2024 02:03 |
Today in academia I saw a presentation that contained some code. All the variables were named things like "rhocxaRfpup" and "rhocxaIfpup" (both exact quotes).
|
|
# ? Jun 9, 2016 23:38 |
|
VikingofRock posted:Today in academia I saw a presentation that contained some code. All the variables were named things like "rhocxaRfpup" and "rhocxaIfpup" (both exact quotes). Was this computational chemistry, by any chance?
|
# ? Jun 10, 2016 00:17 |
Absurd Alhazred posted:Was this computational chemistry, by any chance? Solid state physics. Why do you ask?
|
|
# ? Jun 10, 2016 00:48 |
|
VikingofRock posted:Solid state physics. Why do you ask? "rho" combined with stuff that looked like it might be molecule names made me think it was some kind of time-dependent molecular density calculation.
|
# ? Jun 10, 2016 01:58 |
|
rho is a common character to use as a constant in math and cs too. there's an o(n) median finding algorithm for unsorted arrays where the complexity is really o(rho*n) to hide that fact that rho is a constant factor of like 137 making it completely worthless compared to just doing a merge sort.
|
# ? Jun 10, 2016 02:23 |
|
LeftistMuslimObama posted:rho is a common character to use as a constant in math and cs too. there's an o(n) median finding algorithm for unsorted arrays where the complexity is really o(rho*n) to hide that fact that rho is a constant factor of like 137 making it completely worthless compared to just doing a merge sort. Yeah, but would you use it to name a variable? It immediately jumped out at me as a density.
|
# ? Jun 10, 2016 02:25 |
|
Klades posted:http://www.aoc.nrao.edu/php/tjuerges/ALMA/ACE-5.5.2/html/ace/OS__main_8h-source.html I'm on a project that uses this. Fortunately, at the level I work, I'm normally insulated from it. We use its build system, though, which is a pain. It's a cross platform thing (written in Perl) which generates build files for various systems. It works OK for VS, but the makefiles it generates suck. No header-dependency-change detection, so you have to do a full rebuild to be safe. I ended up hacking in .d file stuff myself. Also, the "clean" doesn't clean everything you'd expect from a typical makefile setup; you have to remember to do realclean, or you'll get surprised. The biggest horror I've seen from ACE itself, though, is ACE_Guard. Unlike every other guard you'll find for C++, this isn't safe: code:
code:
Also, prefixing everything with ACE_ (inside an ACE namespace...), and the Capitalized_Words_With_Underscores convention is super ugly.
|
# ? Jun 10, 2016 02:37 |
|
eth0.n posted:Also, prefixing everything with ACE_ (inside an ACE namespace...), and the Capitalized_Words_With_Underscores convention is super ugly. Explicit namespacing and "using" is one of the things I like about C# (and implicit namespacing through directory placement is what I really don't like about Java).
|
# ? Jun 10, 2016 02:47 |
|
eth0.n posted:<horrible ACE stuff> Yeah, the project I'm on is mostly written in a similar style to ACE (and has a heap of ACE and CORBA-related frameworks involved) and as an added bonus, is C++03 only. It's my experience so far that ACE is a muddled, mostly undocumented wreck and a complete pain to sort through. I think the ACE_ naming thing is because ACE's first release was three years after C++ first got namespaces, and I don't get the impression that they move quickly to adopt new language features. I'd be hard pressed to even tell you what ACE gives you that the standard library can't at this point, but then I'm not exactly a C++ guru or anything. eth0.n posted:I'm on a project that uses this. Fortunately, at the level I work, I'm normally insulated from it. We use its build system, though, which is a pain. It's a cross platform thing (written in Perl) which generates build files for various systems. It works OK for VS, but the makefiles it generates suck. No header-dependency-change detection, so you have to do a full rebuild to be safe. I ended up hacking in .d file stuff myself. Also, the "clean" doesn't clean everything you'd expect from a typical makefile setup; you have to remember to do realclean, or you'll get surprised. Have you tried "make depend"? Or was it "make depends", I forget. Either way, I was having an issue with it not recompiling template code until I ran that and now it seems to be fine. Not that I actually work on the thing in Linux, because the massive clusterfuck of #defines ACE is made out of and the "include .cpp file in .h for templates" style both make the clang static analyzer cry, which in turn makes my syntax highlighting in vim absolutely poo poo the bed, which makes editing the code there unpleasant.
|
# ? Jun 10, 2016 02:52 |
|
Klades posted:I'd be hard pressed to even tell you what ACE gives you that the standard library can't at this point, but then I'm not exactly a C++ guru or anything. We use it for cross-platform locking, threading, and networking. Hopefully we'll switch the locking and threading to C++11 (we might), and ideally we'd use asio for networking, but I doubt that'll happen. quote:Have you tried "make depend"? Or was it "make depends", I forget. Either way, I was having an issue with it not recompiling template code until I ran that and now it seems to be fine. Not that I actually work on the thing in Linux, because the massive clusterfuck of #defines ACE is made out of and the "include .cpp file in .h for templates" style both make the clang static analyzer cry, which in turn makes my syntax highlighting in vim absolutely poo poo the bed, which makes editing the code there unpleasant. Interesting; will have to give that a try. Of course, the fact that I was looking specifically for that in the docs, and couldn't find it, and it isn't done by default like any sane makefile, is still bad...
|
# ? Jun 10, 2016 03:57 |
|
Absurd Alhazred posted:What about a >oo < operator?
|
# ? Jun 10, 2016 05:48 |
|
I'd write it as E°( )∃
|
# ? Jun 10, 2016 08:30 |
Absurd Alhazred posted:Yeah, but would you use it to name a variable? It immediately jumped out at me as a density. The rho did correspond to a rho in a relevant equation, and the "up" at the end corresponded to the number of particles in a spin up state. That's as far as I got though. Honestly it might not have been a horror in context, but I did think it was pretty amusing!
|
|
# ? Jun 10, 2016 08:50 |
|
Klades posted:Yeah, the project I'm on is mostly written in a similar style to ACE (and has a heap of ACE and CORBA-related frameworks involved) and as an added bonus, is C++03 only. It's my experience so far that ACE is a muddled, mostly undocumented wreck and a complete pain to sort through. Sup ACE/TAO horror buddies. I'm moving our ACE-using legacy stuff to new compilers (no more gcc 3.4!) - but bear in mind not all of us have the luxury of an up-to-date standard library. We can't use gcc on AIX (miscompiles our stuff) so we have to use IBM's xlc compiler - which claims partial C++11 compliance but doesn't have std::shared_ptr (it's in std::tr1). Or std::unique_ptr at all. Or std::move. Anyway, we actually use CORBA (the TAO part of ACE/TAO) so dropping ACE is not exactly an option!
|
# ? Jun 10, 2016 12:12 |
|
eth0.n posted:... Also, the "clean" doesn't clean everything you'd expect from a typical makefile setup; you have to remember to do realclean, or you'll get surprised. Nice to see the naming tradition that brought us mysqli_real_escape_string is still alive and well. feedmegin posted:Sup ACE/TAO horror buddies. I'm moving our ACE-using legacy stuff to new compilers (no more gcc 3.4!) - but bear in mind not all of us have the luxury of an up-to-date standard library. We can't use gcc on AIX (miscompiles our stuff) so we have to use IBM's xlc compiler - which claims partial C++11 compliance but doesn't have std::shared_ptr (it's in std::tr1). Or std::unique_ptr at all. Or std::move. Eh, if it supports C++11 but only libraries are missing, you should be able to write unique_ptr etc easily. Its shared_ptr thats gonna get ya.
|
# ? Jun 10, 2016 13:13 |
|
VikingofRock posted:The rho did correspond to a rho in a relevant equation, and the "up" at the end corresponded to the number of particles in a spin up state. That's as far as I got though. Honestly it might not have been a horror in context, but I did think it was pretty amusing! These problems always come up when trying to translate a paper or standard equation into code. The equations are often written using single (often greek) letters, so do you translate that literally or try to come up with some sort of meaningful name? The latter might seem more obvious to a programmer but there are often intermediate equations that have no meaningful term attached to them, or you end up with variable names or lines of code that are extremely unwieldily. At the very least though you should use underscores or camel casing. rhocxaRfpup is a bit much.
|
# ? Jun 10, 2016 15:06 |
|
Xarn posted:Eh, if it supports C++11 but only libraries are missing, you should be able to write unique_ptr etc easily. Its shared_ptr thats gonna get ya. Which is basically what I did, yeah. It's still a rather fundamental thing to be missing especially since move constructors do seem to be in there. My theory is the actual compiler team at IBM is good/competent/staffed, it even handles lambdas and stuff, but the people maintaining the C++ library to go with it are a separate team that's been downsized/is poo poo.
|
# ? Jun 10, 2016 15:22 |
|
More of an error message horror I suppose
|
# ? Jun 10, 2016 15:48 |
|
Knyteguy posted:
one time i tried to join a string with a numeric type that didnt implement toString(). it was a cat-astrophe.
|
# ? Jun 10, 2016 16:10 |
|
LeftistMuslimObama posted:one time i tried to join a string with a numeric type that didnt implement toString(). it was a cat-astrophe.
|
# ? Jun 10, 2016 18:19 |
|
Knyteguy posted:
The WPF designer definitely counts as a horror.
|
# ? Jun 10, 2016 19:39 |
|
feedmegin posted:Sup ACE/TAO horror buddies. I'm moving our ACE-using legacy stuff to new compilers (no more gcc 3.4!) - but bear in mind not all of us have the luxury of an up-to-date standard library. We can't use gcc on AIX (miscompiles our stuff) so we have to use IBM's xlc compiler - which claims partial C++11 compliance but doesn't have std::shared_ptr (it's in std::tr1). Or std::unique_ptr at all. Or std::move. Oh god it's been almost ten years and you just gave me terrible flashbacks...
|
# ? Jun 10, 2016 23:00 |
|
https://twitter.com/Jonathan_Blow/status/741424368530554881
|
# ? Jun 11, 2016 01:42 |
|
MakeIntResourceAEx(i, NULL, NULL, NULL, NULL, NULL, hWnd);
|
# ? Jun 11, 2016 01:52 |
|
I've only briefly touched windows.h in my career, but the carnaval parade of null pointers is a dead giveaway you are dealing with windows API code.
|
# ? Jun 13, 2016 13:23 |
|
OpenCL and Vulkan also have a rather annoying pattern that relies on nulls:code:
Vulkan also has quite a few "this argument must always be null" requirements in its API specification, though I assume they're there either for backwards compatibility with old alpha implementations or else they plan to have those arguments do something in future extensions.
|
# ? Jun 13, 2016 13:34 |
|
LeftistMuslimObama posted:one time i tried to join a string with a numeric type that didnt implement toString(). it was a cat-astrophe. wouldn't that actually be a concat-astrophe
|
# ? Jun 13, 2016 15:07 |
|
Literal spaghetti code: (it's a blueprint from unreal engine 4, which is their visual scripting implementation)
|
# ? Jun 13, 2016 16:22 |
|
xzzy posted:visual scripting This will never not be a terrible idea, and people will never stop trying it regardless.
|
# ? Jun 13, 2016 18:27 |
|
when we are all replaced with robots hr will make vizio charts to run the company.
|
# ? Jun 13, 2016 18:29 |
|
Soricidus posted:This will never not be a terrible idea, and people will never stop trying it regardless. If you mean what I think you do, it's a fantastic gateway drug for getting non-programmers into programming, because they don't realize they're programming. Naturally, everything they create belongs in this thread, but I think the tradeoff is worth it
|
# ? Jun 13, 2016 18:32 |
|
Visual scripting systems seem simple for trivial tasks and explode into horrors when employed to perform complex tasks. The apparent simplicity of visual scripting for stuff like a fahrenheit to celsius temperature converter is why the idea will never stop being reinvented. Unfortunately, when you start dealing with the expressive power of a real programming language you also deal with the parts that make programming intrinsically hard- algorithmic thinking, factoring apart complex problems, etc. Based on my teaching experience I'm dubious of the importance of things like Scratch, as they only prevent the most trivial types of syntax error at the cost of making entering and modifying code a slow, tedious process of endless clicking and dragging. You avoid some pitfalls initially, but make experimenting more painful over a longer term. The layout of visual programs is at least as problematic and time-consuming as whitespace and formatting in text-based languages. Still, Scratch and its ilk are explicitly designed as sandboxes for experimentation- there's very little at stake and everyone who enjoys Scratch will eventually graduate to other tools. No harm done. LabView and Excel, on the other hand, pose some meaningful danger. They allow "non-programmers" to solve useful problems for themselves, which is great, but they're all too often used in production environments. Where you could have a straightforward script in nearly any sane language you instead get a tangled mess that is all but impossible to audit for correctness or instrument for tests.
|
# ? Jun 13, 2016 18:56 |
|
Sadness is being handed a lovely irregular CSV and told to write an auto-importer for it.
|
# ? Jun 13, 2016 20:48 |
|
Internet Janitor posted:LabView and Excel, on the other hand, pose some meaningful danger. They allow "non-programmers" to solve useful problems for themselves, which is great, but they're all too often used in production environments. Where you could have a straightforward script in nearly any sane language you instead get a tangled mess that is all but impossible to audit for correctness or instrument for tests. Also, Access. I worked at a place where everyone was a "data analyst", and only knew Access with VBA macros, and SAS. Any UI stuff had to be done using Access, which is OK for simple data entry, but I was tasked with a multi-site research study, where patients would answer a survey form at each visit on a tablet (old-school Windows XP tablet). This had to be implemented in Access, and I couldn't even use an SQL server. It ended up being a bunch of client Access DBs hooked up to a backend Access DB sitting on a network file share.
|
# ? Jun 13, 2016 21:27 |
eth0.n posted:Also, Access. I worked at a place where everyone was a "data analyst", and only knew Access with VBA macros, and SAS. Any UI stuff had to be done using Access, which is OK for simple data entry, but I was tasked with a multi-site research study, where patients would answer a survey form at each visit on a tablet (old-school Windows XP tablet). Better than storing data collected on each machine and then manually merging at the end of the day.
|
|
# ? Jun 13, 2016 21:31 |
|
I actually kinda like this because spaghetti code actually looks like spaghetti in these languages. Most of these tools have support for abstractions like making your own blocks, so it's not like it's impossible to make clean "visual code", but bad code is possible in any languages. Perhaps this, combined with a two-way textual DSL, would make this style a bit better. That way, you can "switch gears" to a textual form for more intensive refactoring tasks. But I often use flow graphs and other aids when writing large, complex code myself. I think it's a space that should be explored further, but I agree that the current tooling around it is horrendous clicking and dragging.
|
# ? Jun 13, 2016 21:33 |
|
Suspicious Dish posted:I actually kinda like this because spaghetti code actually looks like spaghetti in these languages. yeah ... I will grant that there are interesting possibilities. but the problem with all this is that this kind of thing is invariably designed as a way for non-programmers to program, not as a tool to aid experienced programmers with large complex code. non-programmers are not going to use abstractions like making their own blocks.
|
# ? Jun 13, 2016 21:46 |
|
We very briefly contemplated trying to make an explicitly scope-limited visual programming system for our project at work, since it's used by a lot of scientists who are not skilled programmers. Then we saw a competitor's attempt at the same idea, which was plenty enough to dissuade us.
|
# ? Jun 13, 2016 21:52 |
|
|
# ? Jun 7, 2024 02:03 |
|
Internet Janitor posted:LabView and Excel, on the other hand, pose some meaningful danger. They allow "non-programmers" to solve useful problems for themselves, which is great, but they're all too often used in production environments. Where you could have a straightforward script in nearly any sane language you instead get a tangled mess that is all but impossible to audit for correctness or instrument for tests. My brother is a perfect example of this - I love him dearly, but I feel slightly uncomfortable when he shows me an "application" that is used to calculate mortgage interest rates "written" in Excel. eth0.n posted:Also, Access. I worked at a place where everyone was a "data analyst", and only knew Access with VBA macros, and SAS. Any UI stuff had to be done using Access, which is OK for simple data entry, but I was tasked with a multi-site research study, where patients would answer a survey form at each visit on a tablet (old-school Windows XP tablet). Also this. All in a top international bank. I mean - all the calculations and formulas are his work, but you'd think there should be some IT department that would take those and spin into some sensible app. Nope - no resources canis minor fucked around with this message at 21:59 on Jun 13, 2016 |
# ? Jun 13, 2016 21:54 |