|
Can't use numeric constants as enumerated values, for one thing.
|
# ¿ Mar 23, 2013 07:37 |
|
|
# ¿ May 13, 2024 15:11 |
|
1337JiveTurkey posted:Semi-serious idea: Cut out the middleman and store the parse tree directly in an open format like XML, YAML or JSON. Then have editors use a grammar to display the file for editing and to save the edited file. Use stylesheets to format the displayed source code. If you don't give a gently caress about whitespace, then you might as well have a language that doesn't give a gently caress about whitespace. Greenspun's Tenth Rule comes to mind.
|
# ¿ Jul 11, 2013 01:04 |
|
Somebody was asking me about whether there was a way to define constants in Javascript. God help me, there is. This is the example I ended up giving them, along with a warning not to do it:code:
|
# ¿ Aug 11, 2013 15:33 |
|
I'm glad that study exists, because now it means I have a reason to pick a style and stick with it in solo projects.
|
# ¿ Aug 30, 2013 15:31 |
|
Java's got a very mature ecosystem surrounding it. There are Java libraries for drat near everything and the standard library is quite featureful (some would say bloated). It basically defines what "enterprise" coding looks like, for good or for ill, which is to say it tends to encourage verbosity and is probably overkill for very small-scale projects. There are open-source and commercial tools for Java development that surpass most other languages in their sophistication; the most widely-used open-source IDE was originally developed for (and still best supports) Java development. JVM bytecode can be run virtually anywhere unaltered, and there are many other stable languages that target the JVM (and call Java libraries) if you don't like Java proper. The language itself is basically a subset of C#. (Or, since Java is older, say that C# is a superset Java.) If your background is in C# then you might find Java a bit stifling and awkward but you won't have to learn any new tricks.
|
# ¿ Oct 2, 2013 11:11 |
|
One way it was explained to me is something like this: Where functional programming works by modeling the solution, OOP works by modeling the problem. You approach the task from the opposite direction. But a large part of the problem is that a lot of beginning CS students are treated (rightly or wrongly) like they have no understanding of taxonomy, which is a concept that comes up a lot in OOP even if it doesn't exactly correspond to what it's useful for in the real world.
|
# ¿ Oct 5, 2013 20:44 |
|
Have you tried D?
|
# ¿ Oct 12, 2013 02:05 |
|
OBAMA BIN LIFTIN posted:Personally, not many women are in computers. There must be a solid empirical reason for this? It's because there's not enough room for a woman inside of one. They're pretty small, mostly. Edit: computers, I mean
|
# ¿ Apr 10, 2014 13:22 |
|
There are even fewer men in computers than women because men are larger.
|
# ¿ Apr 10, 2014 13:30 |
|
This thread has a lot of wrong tools.
|
# ¿ May 15, 2014 18:51 |
|
Subjunctive posted:Fishing in the pond of "people who have their poo poo together enough to participate on github" is going to be better odds than the pond of "everyone who uploaded a resume" Sentences like this make it sound like a requirement.
|
# ¿ Jun 7, 2014 02:26 |
|
Being able to port existing code to a browser is valuable, apparently.
|
# ¿ Apr 3, 2015 00:52 |
|
Type and symbol names changed, but otherwise unaltered:code:
|
# ¿ Aug 6, 2015 01:05 |
|
If the only thing that matters about a variable is that it is an instance of its type, then naming it after its type is the most appropriate choice.
|
# ¿ Aug 7, 2015 05:59 |
|
It's always a good time to remember FizzBuzzEnterpriseEdition.
|
# ¿ Aug 17, 2015 00:31 |
|
Don't switch statements get optimized into jump tables when compiling, or am I thinking of .NET?
|
# ¿ Aug 17, 2015 19:17 |
|
C# properties are what you want. Java does not have syntax for them. Just use getters and setters. You'll get used to it.
|
# ¿ Oct 13, 2015 02:35 |
|
NihilCredo posted:I had a wild encounter in the F# subreddit and now I think I understand better the story about Babbage and the MPs. This story is unfamiliar to me.
|
# ¿ Nov 21, 2015 21:18 |
|
Using non-boolean values in boolean contexts should be avoided because the results are often surprising.
|
# ¿ Jan 15, 2016 08:40 |
|
PHP is certainly the most Kafkaesque language.
|
# ¿ Mar 17, 2016 02:03 |
|
It's not close to production-strength yet, but Stencila is germane to this topic.
|
# ¿ Jun 14, 2016 05:12 |
|
Node was invented by someone who was looking for ideas for things to do with Javascript, and he misunderstood them when they told him to cram it in his backend.
|
# ¿ Jun 23, 2016 04:55 |
|
Of all the problems with Javascript, namespace issues with the window events is way down on the list. I don't hate it most.
|
# ¿ Jun 26, 2016 20:46 |
|
NihilCredo posted:Speaking of Java boilerplate, am I the only one who sees this as a coding horror? This is just verbose currying.
|
# ¿ Aug 17, 2016 17:39 |
|
Some pairs of functions can be proven equivalent, but there's no general way.
|
# ¿ Aug 17, 2016 18:21 |
|
Type systems can only enforce what they can prove.
|
# ¿ Aug 17, 2016 18:46 |
|
We can't just not paint the bike shed.
|
# ¿ Aug 18, 2016 07:57 |
|
HappyHippo posted:When confronted with static typing some people jam everything into string literals to shut the compiler up. It's basically a form of weak typing. I've seen numbers, bools, and what ought to be enumerations handled this way. It's called "stringly typed"
|
# ¿ Oct 12, 2016 02:51 |
|
ROFLburger posted:Ah yes, the monthly argument over testing. bad
|
# ¿ Feb 4, 2017 05:57 |
|
Lots of things have goto. C# has goto. Java doesn't even have goto (it reserves the keyword but doesn't use it), but they put it in C#.
|
# ¿ Feb 13, 2017 02:17 |
|
The interview question is not "Write a good implementation of FizzBuzz."
|
# ¿ Apr 5, 2017 03:06 |
|
Does it do what was specified?
|
# ¿ Apr 5, 2017 07:19 |
|
It doesn't much matter what a student's first language is as long as it's not their only language. Java has a lot of ceremony that a teacher needs to remind the students to ignore until they're ready for it, however, which makes it a bit harder to start with.
|
# ¿ Apr 23, 2017 03:11 |
|
For an introductory course, aimed at teaching the most basic elements of programming literacy (things like what is a variable, what is an expression, what is a subroutine), even a significantly worse language than Javascript could still get the job done (as long as it's not an esolang, I guess). Given that, being able to get code running with as few dependencies (both environmental dependencies and boilerplate code) as possible is a big advantage. Plus, teaching languages and production languages have very different requirements, which is why you almost never see websites where the rendering is written in Logo, even though it's great. And contrary to some rumors, starting with a bad language, no matter how poor its capabilities, consistency, ergonomics, etc. won't cripple a developer, only change the order that they learn the concepts. Someday we will be free of the curse of Javascript, but it won't be this year, or next.
|
# ¿ Apr 23, 2017 06:00 |
|
Pollyanna posted:What were pre-N64 games written in? Straight-up assembly? Mostly, yes.
|
# ¿ May 21, 2017 01:27 |
|
Some languages have indentation idioms that might break under a proportional font, but in general it's fine.
|
# ¿ Jun 2, 2017 02:38 |
|
'Course, in cases like that, I prefer to do something likecode:
|
# ¿ Jun 2, 2017 04:16 |
|
Here's the question that leads to further horror: is the ordering's randomness of cryptographic quality?
|
# ¿ Jul 7, 2017 06:07 |
|
Doc Hawkins posted:This code made me laugh. Racket is a trip.
|
# ¿ Jul 10, 2017 03:28 |
|
|
# ¿ May 13, 2024 15:11 |
|
Go 2 considered harmful
|
# ¿ Jul 14, 2017 15:51 |