News for hackers. Stuff that matters.
Re:Fun vs. Computer Science (2016) by dmytroi on Saturday August 26, 2017 @05:35AM (#15104783)
Great question! To make things even more annoying - C doesn't have namespaces. So people are forced to write long names like "my_struct_hash_map_t" everywhere, which makes all modern C code look like wall of text (compare too older style code "mshm_t*a = hmalloc()"). To answer honestly - I'm asking myself very pragmatic question: "do I really need a generic code?" much more often compare to C++. In game development C++ templates were used mostly for math libraries (2d/3d/4d vectors, matrices, etc) and containers (hashmap, lists, etc). If we look closely on math libraries we can make a compromise "just float is enough", and if we make such compromise then everything is simple - one don't need templates for math lib anymore, I'm currently using "gb_math.h" [1] and it works pretty good. Containers on the other hand are more challenging, the key here is to understand "can I make this work with linear (maybe static) array?" - and in most cases yes, then you don't need any containers because just arrays will do. If algorithm specific do require a hashmap or list, well, gonna use what we have: macro! It looks weird, and it is weird, but something like khash.h [2] works fine in production.

In reality what it means for me is that I need to spend time making decisions about containers, which is good for game development, as what makes games fun doesn't have any connection to templates. But it also bad for casual non-game related code. I find it much faster to just "hey load this json, do some processing, and save json back" do that in Python than trying to do in C just for sake of C. Ideally namespaces/templates and operator overloading in C would solve all this struggles, but then where C ends and C++ starts?

- [1] https://github.com/gingerBill/gb/blob/master/gb_math.h - [2] https://github.com/attractivechaos/klib/blob/master/khash.h

Re:Fun vs. Computer Science (2016) by TheOtherHobbes on Saturday August 26, 2017 @06:55AM (#15104937)
There's a bizarre lack of interest in CS in the psychology of usable systems - either for developers or for users - which takes into account practical requirements like cycle time.

A lot of CS seems to be story-telling: "This feature makes language X better/worse, because it just does, obviously" with no independent testing or peer review of language productivity and robustness in real work environments.

Re:Fun vs. Computer Science (2016) by steinuil on Saturday August 26, 2017 @07:38AM (#15105038)
I think that's why Go is so popular right now. I find the language kind of depressing from a PLT perspective, but it was built taking into account practical requirements such as fast compile times, a standard formatting tool, ease of deployment, etc, which makes it a very good system.
Re:Fun vs. Computer Science (2016) by xfer on Saturday August 26, 2017 @02:00PM (#15106548)
I would like you to cite some papers, which claims it makes language X better/worse without any explanation.
Re:Fun vs. Computer Science (2016) by mmirate on Saturday August 26, 2017 @07:09AM (#15104967)
Well then, so much for it being Computer Science...
Re:Fun vs. Computer Science (2016) by dahart on Saturday August 26, 2017 @09:59AM (#15105464)
Since computers are built by people for people, it does seem like we're missing the most important and difficult science in favor of doing the science that's easy to do. It's easy to reason about how a system that I designed will perform. It's hard to answer the questions of how our technology choices affect other people. It would be great if science could help us design high quality systems with a limited budget, or establish a theory around whether designing any given system will improve someone's life. It would be pretty dang useful if we had some formal scientific results around what makes a game fun, or more generally what makes software pleasant to use and productive.
Re:Fun vs. Computer Science (2016) by mmirate on Saturday August 26, 2017 @04:09PM (#15107168)
> establish a theory around whether designing any given system will improve someone's life

That would be sociology or one of its siblings, no?

... or, at best, the piddly "ethics" course that gets tacked on to most undergraduate CS degree programs?

Re:Fun vs. Computer Science (2016) by alecbenzer on Saturday August 26, 2017 @09:37AM (#15105363)
As-is, CS really is much closer to a branch of mathematics than a science.
Re:Fun vs. Computer Science (2016) by andrewflnr on Saturday August 26, 2017 @03:16PM (#15106898)
Eh, in a similar way to how theoretical physics is mostly math. Math is the tool you're using, but the assumptions are all based on real-world observations.
Re:Fun vs. Computer Science (2016) by alecbenzer on Sunday August 27, 2017 @06:12PM (#15113108)
I don't know about that; real world observations like what?
Re:Fun vs. Computer Science (2016) by andrewflnr on Tuesday August 29, 2017 @05:13PM (#15127647)
Like observations of what can and can't be computed by physical objects. The point of the Church-Turing thesis is that things you prove about Turing machines are proofs about what you can compute in the real world, not just some abstract mathematical model.
Re:Fun vs. Computer Science (2016) by pharrington on Saturday August 26, 2017 @01:57PM (#15106542)
Fortunately, computer science still literally means just that - it's an exploration of the properties of computers. As to humans developing computer based systems, yes, scientific rigor is not mandatory, just as you don't require understanding classical mechanics to build an abode. As to the psychology at play with humans developing and using computer based systems, rigorous psychology is eminently suited to your concerns.