Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "xslt"
-
Best: the tool that works for the job.
Worst: the tool that doesn’t.
Example: Ruby is great for scripts and web dev, but simply doesn’t work for graphics engines.
Example: SQL is great for fetching data (etc.), but it is absolutely terrible for business logic.
Example: XSLT is great for lowering your faith and your will to live, but it is absolutely awful for literally every other purpose.21 -
Most hated language features?
PL/SQL:
• it exists
XSLT:
• it also exists
PHP:
• it still exists.
VB:
• Significant parentheses: `subName` calls the subroutine, and `subName()` calls the subroutine and gets a return value. If you use the wrong invocation, it yells at you. Why!?
• For reasons unknown, you can only have `sleep` appear once per codebase. (So put it in a function!)
Ruby:
• It’s bloody easy to write code with absolute shit performance, and it kind of feels encouraged because of just how easy Ruby makes everything. Less critical thinking means worse performance, and Ruby’s blissful elegance encourages mental laziness.
• Minor: You cannot pass a hash as the first method parameter without enclosing it in parentheses, ex:`method({key: value})`. This is due to the ambiguous case between passing a hash argument and a (curly) block/proc (`method {|args| code}`). This could be remedied pretty easily with a little bit of look ahead.
• Minor: There is no `elsif` for `unless` (a negated if). Why? No reason given.
Python:
• no block endings, so nested code can be extremely difficult to follow.
Bash:
• The freaking syntax oh god why.
All languages:
• rand vs rand() vs Rand vs Rand() vs rnd vs RND vs random() vs random vs randInt() vs Math.random() vs Math.randInt() vs ...18 -
I could bitch about XSLT again, as that was certainly painful, but that’s less about learning a skill and more about understanding someone else’s mental diarrhea, so let me pick something else.
My most painful learning experience was probably pointers, but not pointers in the usual sense of `char *ptr` in C and how they’re totally confusing at first. I mean, it was that too, but in addition it was how I had absolutely none of the background needed to understand them, not having any learning material (nor guidance), nor even a typical compiler to tell me what i was doing wrong — and on top of all of that, only being able to run code on a device that would crash/halt/freak out whenever i made a mistake. It was an absolute nightmare.
Here’s the story:
Someone gave me the game RACE for my TI-83 calculator, but it turned out to be an unlocked version, which means I could edit it and see the code. I discovered this later on by accident while trying to play it during class, and when I looked at it, all I saw was incomprehensible garbage. I closed it, and the game no longer worked. Looking back I must have changed something, but then I thought it was just magic. It took me a long time to get curious enough to look at it again.
But in the meantime, I ended up played with these “programs” a little, and made some really simple ones, and later some somewhat complex ones. So the next time I opened RACE again I kind of understood what it was doing.
Moving on, I spent a year learning TI-Basic, and eventually reached the limit of what it could do. Along the way, I learned that all of the really amazing games/utilities that were incredibly fast, had greyscale graphics, lowercase text, no runtime indicator, etc. were written in “Assembly,” so naturally I wanted to use that, too.
I had no idea what it was, but it was the obvious next step for me, so I started teaching myself. It was z80 Assembly, and there was practically no documents, resources, nothing helpful online.
I found the specs, and a few terrible docs and other sources, but with only one year of programming experience, I didn’t really understand what they were telling me. This was before stackoverflow, etc., too, so what little help I found was mostly from forum posts, IRC (mostly got ignored or made fun of), and reading other people’s source when I could find it. And usually that was less than clear.
And here’s where we dive into the specifics. Starting with so little experience, and in TI-Basic of all things, meant I had zero understanding of pointers, memory and addresses, the stack, heap, data structures, interrupts, clocks, etc. I had mastered everything TI-Basic offered, which astoundingly included arrays and matrices (six of each), but it hid everything else except basic logic and flow control. (No, there weren’t even functions; it has labels and goto.) It has 27 numeric variables (A-Z and theta, can store either float or complex numbers), 8 Lists (numeric arrays), 6 matricies (2d numeric arrays), 10 strings, and a few other things like “equations” and literal bitmap pictures.
Soo… I went from knowing only that to learning pointers. And pointer math. And data structures. And pointers to pointers, and the stack, and function calls, and all that goodness. And remember, I was learning and writing all of this in plain Assembly, in notepad (or on paper at school), not in C or C++ with a teacher, a textbook, SO, and an intelligent compiler with its incredibly helpful type checking and warnings. Just raw trial and error. I learned what I could from whatever cryptic sources I could find (and understand) online, and applied it.
But actually using what I learned? If a pointer was wrong, it resulted in unexpected behavior, memory corruption, freezes, etc. I didn’t have a debugger, an emulator, etc. I had notepad, the barebones compiler, and my calculator.
Also, iterating meant changing my code, recompiling, factory resetting my calculator (removing the battery for 30+ sec) because bugs usually froze it or corrupted something, then transferring the new program over, and finally running it. It was soo slowwwww. But I made steady progress.
Painful learning experience? Check.
Pointer hell? Absolutely.4 -
I've been staffed on a old ongoing project, first day.
0. Compatibility has to be guaranteed down till IE9... ppf.
1. Front end made in XHTML+JS(jQuery)... bah, ok.
2. XHTML+JS is actually generated by PHP5.4, not a line is actually statically served... beh, funny, ok.
3. PHP files are the output of an XSLT transform of a bunch of XMLs... meh, seriously? Oooook.
4. XMLs are the product of the serialisation of a truck of stateful JavaEE6 DTOs populated magically (undocumented) with data coming from a SQL DB... WTF mode!!!
5. Session logics lives within PHP-land at point 2, front end makes ajax calls here that propagates to another WS out of our control that triggers -somehow- (undocumented) our Java backend at point 4 to generate new XMLs and then reach front end again. Kill me now.
Boss: look... it's too slow for the client, it's too heavy on our servers: fix it. Ah, and we sold 85% test coverage by October. You're the man for the job. (I'm a Node.js fullstacker and right now there's not even a testing scaffold, ofc).
Me: prod is on Linux or Windows?
Boss: RHEL7.
Me: rm -rf / as root. Done.
Boss: I know I know...
Me: ...
I think time has come...6 -
I saw someone rant about XML earlier, but truly the thing that puts me on the edge is XSLT. Who invented that crap.7
-
Ah Christmas again...
That time of the year to fix your parents computer problems or in my case I am still trying to eliminate windows XP...2 -
Someone once told me our bachelor's thesis would be the most frustrating thing we've ever done. However, its really been wonderful because we can do whatever the fuck we want, meaning:
NO MORE FUCKING INLINE JS
NO MORE FUCING INLINE CSS
NO MORE FUCKING CANCEROUS CSS STYLESHEETS
NO MORE FUCKING PROCEDURAL PHP
NO MORE FUCKING XSLT
NO MORE FUCKING INLINE SQL
Absolutely wonderful.2 -
Nobody wants to maintain XSLT mappings. Being a developer, even I don't want to. So what do we do? We parse the XSLT using JAVA code in a horrible attempt create an excel with mappings. God damn it!!1
-
Does anyone even use AWS CDK?
I saw something about CDKv2 getting released and immediately made up my mind about it and just want to validate my opinion.
I'm having a hard time thinking of a case where I would need to use yet another layer of bullshit to deploy cloud infra.
It's bad enough with terraform(which I far prefer over cloud formation). But now you can use python or node? What's next, deploying with XSLT?
I'm partially ranting, because I know someone on my team is going to show this as the "new thing" and I'll be stuck maintaining my code...as code--and that really pisses me off.
I'm also legitimately curious on how many of you have run across this being used successfully and for what problem did it solve?10 -
The "language" I hated the most was XSLT 1.0. Some times you ended up with a horrible set of template matches or choose clauses to achieve simple decision trees.2
-
I got a new Drupal project to maintain. (🤬🤬🤬)
So I'm looking at the content and noticed raw HTML inside the content area. I first thought, the client is using a wysiwyg editor.. But no. It's worse.
He is transforming a XML with XSLT to HTML and copy & paste everything. The result are nested <html><body> tags and everything breaks.
Just because drupal is to hard to work with. I will burn everything and install WordPress 🤯🤬🤬🤬2 -
So I am working on some xslt code I use to generate html. Technically xslt is supposed to be Turing complete? So it is producing html. Am I programming or not since it is generating html?
Yes, I have loops and branching logic in my xslt file. Though I am not really touching those portions right now. Just generating more output from more data input provided to the source xml data.
Is this still a better love story than Javascript?9 -
Used XSLT for the first time at work. It seems like it can be a pretty powerful tool in the right situation, but I'm not too happy that I have to use it in the first place.2
-
I'm trying to find reasons to learn XSLT. So far, I've found plently of blogs, articles and so on. Thing is though, they're all pre-2010.5
-
Does anyone know how to keep xml tags in the order they where in when using xslt.
So lets say my document goes
<page>
<heading>Some Heading</heading>
<paragraph>...</paragraph>
<paragraph>...</paragraph>
<heading>Another heading</heading>
*More paragraphs
</page>
How would i keep the heading and paragraphs in order?1 -
Working on a xslt just to change a single character in an invoice. The system I use does not have the euros sign...
Because fuck manually editing the pdf every month.
Fun.2 -
That feeling when you get the job because of the JS but most of the work is fixing server side xml to play nicely with several vuejs components on the client side.
Or vice versa. Probably the vice versa.2