Every programming language has it's place.
JavaScript's place is in hell.
Every programming language has it's place.
JavaScript's place is in hell.
I used to think Javascript was hell when I barely used it. Now I have to build with it regularly and... once in a while I'm just right about things.
Ever wanted to be somewhere inbetween java and JavaScript?
Yeah, that's Groovy. Only it's the wrong groove
Latex: Problem --> \def\please@#1#2#3#4{\e@kill#2#3{\me#1}#4@now}
-->
Accurate. LaTeX is great, it makes you feel like you have superpowers compared to "office suite"-style software. But every once in a while you just run into some bullshit that feels like it's stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable
where text in the "date" column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotatebox
es, a phantom
, a vspace
, a hspace
and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.
I got way too excited Lemmy parsed LaTeX for a second
PHP: Problem -> real_solution_for_real_this_time()
(real_solution_i_swear()
is unsafe and deprecated)
Eh, your statement is accurate for PHP4 and still relevant up to PHP5.2... We're on PHP8.3 now and PHP8.0 is now out of security updates. I know it's trend to hate on PHP but you've got to at least update your materials to var-vars... it's like knocking node for having substr()
and substring()
.
missing the stage of C where it's all incomprehensible bitfucking with comments like "this works, i do not know why it works, do not touch this"
Real fast inverse square root algorithm hours
That one is not that complicated if you don't think about the math. It's basically just if we interpret the float as int and add a magic number we have a good estimation.
From what I remember at least, it's been a little while since I implemented it.
Perl:
Problem -> $ @ % <=> <> =()= => ; qw() ])} select(undef, undef, undef, 0.25) =~ tr/.?\w\sREg3xfr0mhe|l/foo/g; $|++ &homebrewedFunction(%$ref, $_ , @_ ) -> solution
Source: I mainly code in perl. I like it, but I'll be the first to admit that it's not a beautiful language.
I was about to make an entry for lisp here, but I don't have enough parentheses to draw the path to the solution.
https://www.foo.be/docs/tpj/issues/vol4_4/tpj0404-0015.html
The Perl Poetry Contest - The Perl Journal, Winter 1999
#!/usr/bin/perl
#
# asylum.pl
# by Harl
close (youreyes);
bind (yourself, fast);
while ($narcosis) {
exists $to($calm);
not calm;
}
accept the, anesthesia;
seek the, $granted, $asylum'
and wait;
stat ically;
unlink and listen (in, $complicity);
for (a, little) {
system ("sync hronicity");
}
Perl is write-only code. Larry Wall raised a monkey's paw and asked for a language that works the way programmers want. So most Perl is the first thing someone tried, unfiltered by rigid syntax putting your thoughts in order, compiler warnings bringing side effects to mind, or even names forcing you to decide what a variable is. An uncommented Perl script is raw brain patterns displayed as ASCII.
Thank god it runs like crap. We'd be in so much trouble if it was fast. Optimized C isn't exactly gorgeous, but any project that compiles proves someone looked at the code more than once.
C: "Segmentation fault."
Where?
C: 🤷🏻
C: gestures vaguely everywhere
Then you open the core file with GDB and hope the stack is not smashed.
gdb -> where
python is like that. someone waay smarter than you have already done this 10 years ago.
Idk I still like writing my own stuff purely pythonic when I can. Pythons syntax is the most “fun” and “natural” for me so I find it fun. Like doin a sudoku puzzle
C# Solution -> .sln
(brought to you by .net gang)
OK rust made me laugh
Yeah that one got me too. Rust has tons of c libs wrapped in safe rust.
C --> segfault --> new problem
Sry, the best I can do on mobile
The line between problem and solution for C should be 30 miles long.
...with 19 bugs 9 of which are exploitable.
And one bug that one person found once but is not reproducible
So the developers claim, but the users still encounter it, and the bug report stays open for 22 years ... possibly more.
i feel like javascript could also be
Problem -> solution -> 3 days pass -> all dependencies had breaking changes made -> problem
Python one is accurate. Most of our problems are solved by importing a library and writing the line, librarySolver.importedFunction.SolveMyProblem()
def main(): Print('thanks librarySolver')
for the ones missing the marvelous HTML, I gotchu bro:
<problem />
Add css, and the problem looks really pretty now
Actual C: Problem → Segmentation fault
Didn't see any mention yet, so...
Useless use of cat
!
I’ve seen this before but don’t accept it myself. There are cases where you just wanted to cat. In this case, maybe to review the problem. Then you want to extend the command. Preserving it in the next commands where you start stacking on pipes is useful since it can be fewer strokes and maintain a habit.
C:
Problem
→ return Solution;
C++:
Problem
→
const [auto]&& (Problem&& problem) noexcept(noexcept( Solution<Problem>{}(std::forward<Problem>(problem)) )) { return Solution<Problem>{}(std::forward<Problem>(problem)); } -> decltype( Solution<Problem>{}(std::forward<Problem>(problem)) )
It's ironic that the illustration for JavaScript is probably the most realistic and best solution IRL. In the sense that a lot of what problem solving is (which is a big part of software engineer) is breaking a big problem into smaller problems. And you continue doing this until each problem is solvable in a short period of time.
JavaScript sucks though as a language.
I thought it was a jab at all the NPM packages
JS is basically the Hydra from the Greek Mythology.
Though PHP is literally the problem had me lol.
Java:
Problem -> NullPointerException.
More like
Problem → new ProblemSolverFactory().createProblemSolver().solveProblem();
Exactly. And configured by 5000 lines of brittle XML.
Post funny things about programming here! (Or just rant about your favourite programming language.)