Does anyone use prolog in their day to day life? I would love to hear some anecdotes.
My experience with the language from doing a constraint programming course in master's is that programs that can be solved quickly on procedural languages tend to require immense thinking and testing to be done in prolog. It's gotten so bad that all students don't even bother learning it since you aren't given much time during the exam and the problems are very complex.
I've done the majority of my programming work in Prolog in the last 6 years, both in academia and for a brief stint in the industry (although that was with Visual Prolog which is a very idiosyncratic form of Prolog) [edit: oh, I forget: I did two stints in the industry working with Prolog haha.].
My standard advice is that if you find Prolog too hard then you shouldn't try to learn it because you will most likely never need it in your day to day work and you'll be just wasting time you could use familiarising yourself with the latest js framework or whatever is needed in your line of work. If for some reason you are forced to learn Prolog (as far as I know most university courses don't make it mandatory) and you're trying to solve problems that can be "solved quickly on [imperative] languages" then either those are not good problems to solve to learn Prolog and you should ask your tutor to come up with better ones, or you are trying to program in Prolog using an imperative style that it doesn't support, but again it would be too much hard work trying to learn not to do that so just bite the bullet and wait for the pain to be over.
Don't marry someone you don't love and don't learn a language you don't need. Simple, yes?
Here's a more personal perspective. I first learned Prolog 15 ish years ago, in the second year of my CS (with games design) degree. The difficulty hit me like a ton of bricks. With no exaggeration it took me a week to figure out how to do the simplest of things: cycle through a list of options (those were the turn phases for a Magic: the Gathering game engine. Nobody ever accused of starting with the easy stuff first). I persevered partly because the idea of executing First Order Logic theorems as a computer program took my breath away and partly because everyone agreed that Prolog was so damn hard and I just wanted to brag about being able to learn it to my peers.
I learned it. It took years. I don't think I had the chance to brag to my peers. I went to the university library and picked up every textbook I could find on Prolog, returned home with knees trembling under the weight of my backpack bulging at the seams with K N O W L E D G E and spent weeks lost in them. The more I learned, the more I forgot about bragging and the more I got hooked, like a fool who tries crack for just the one time. The more I used Prolog, the more it hurt me, the more I couldn't understand it, the more I finally got it, the more I got drawn in, deeper and deeper.
It took a few years before I could indulge my passion and follow what our Dang would call my intellectual curiosity, and start a PhD on Inductive Logic Programming (i.e. machine learning × logic programming) but I finally got my wish and like I say above, I've basically done all my programming in Prolog as a day job for the last 6 years or so, with a smattering of Python and R in between.
And now I'm out of a job and I might have to go back to C# and SQL. But, it was good while it lasted. If you want to go on an adventure of the mind, don't put it off. You won't regret it. Find your own Prolog. Go. Go!
If you have a bit of time to translate the problems I was talking about from french to english here they are for example: (2022 - exercise 3) [0] solution [1], directory of past exams[2]
Mmouais, quesque j'ai dit? C'est pas comme ça qu' on represente les matrices en Prolog. Pas comme une liste mais comme un terme qu' on utilise comme un tableau 2d (array) en row-major ordre. Sinon c'est le bordel.
haha wasn't expecting the french response. I wish I spoke it that well. But yeah, the university I was in (usthb) is notorious (in algeria) for having the most difficult exams so stuff like this is expected
You won't know until you try it. From your own description, you feel pressure when someone watches you, so the effect is present. Maybe all you need is a friendly environment. If body doubling with us isn't for you, you might try with the most friendly person you know. If that works for you, you'll know that the method has potential. If not, you can forever skip it.
Suppose you already have a solid foundation so it shouldn't take you a long time to learn these technologies. You already know some programming languages, algorithms and DSs, SOLID, OOP, databases, Web dev, etc.
> Paragraph 2
I'm less looking for a trick and more about I just want to make money asap with the least overhead possible
> Paragraph 3
So wouldn't learning something like AI be a viable option since most layoffs have something to do with AI?
I think I gave the best answer I can with the information you offered. You won’t find any shortcut. If you have marketable skills already then you look for a job. If not I doubt three months trying to learn anything will help much. Not enough time to get real expertise, certainly not enough to impress an employer.
AI has almost nothing to do with the recent layoffs. Interest rates, past over-hiring, and propping up stock prices drive the layoffs.
You can try to jump on the AI bandwagon and ride that bubble out but without experience in the field I think you have a better chance of winning the lottery than getting a job in AI.
I haven't explored other interests as much as I did with software. I chose computer science only because one of my friends in high school wanted it. I remember the day after finishing high school when I was making my choices of university majors and I had no idea what to choose, except for what my friends wanted to do.
No particular dreams. I remember uploading a couple of gaming videos to YouTube back when I was young about some interesting in-game finds. Then eventually made how to videos with adfly links to grab ad money, but abandoned it soon after because of a trauma when I was 16.
Now I want to monetize what I've learned so I have to stick with software. So I'm looking to specialize in something, and I mainly want to invest my time going forward into something that will not be abandoned in a few years.
i know people are upvoting this because it got open sourced but i'm wondering if anyone actually uses UML outside of university classes i attended? if anyone would give his experience i would appreciate it
We make extensive use of sequence diagrams using PlantUML at my work. We don't rigorously adhere to the correct UML arrow types and so on, instead preferring it as a fast way to clearly communicate data flow over time. The fact that it's in a text format means it can be conveniently edited and stored in source control.
I've had less success with component diagrams to represent our systems because the layout engine in PlantUML is (or used to be) quite limited. This resulted in diagrams that didn't communicate the system as well as if I manually drew boxes and lines.
There is a fantastic plugin for Jetbrains IDEs that generates the diagrams in real time which is great for fast feedback, and can be used for driving out diagrams while presenting video calls.
Overall, my conclusion is that you can pick the parts that are useful to you and the people you communicate ideas with.
I found using groups, colors and direction hints gets mostly around the issues. Enough that the benefits outweigh the downsides of switching to something else (that doesn't get source control, requires separate edit/export steps etc).
> There is a fantastic plugin for Jetbrains IDEs that generates the diagrams in real time which is great for fast feedback, and can be used for driving out diagrams while presenting video calls.
That's exactly how I use it!
> We make extensive use of sequence diagrams using PlantUML at my work. We don't rigorously adhere to the correct UML arrow types and so on, instead preferring it as a fast way to clearly communicate data flow over time. The fact that it's in a text format means it can be conveniently edited and stored in source control.
Sure! Docs-As-Code with PlantUML and in our case Sphinx (AsciiDoctor is just as good, in our case Sphinx-Needs moved the needle) is a nice low effort "persist your architecture ideas in the repo" solution. You can check that every PR has a piece of documentation and design coming with the new feature. We're getting more from being in- to semi-formal and not trying to use UML as a programming language.
I have absolutely used it for designing before building complex things and documenting complex things after they've been built. At the design phase, I find it's useful to iterate on high-level UML to anticipate the architectural challenges that lay ahead vs iterating on implementation when I've already found myself in the weeds. If you peruse AWS documentation you'll see UML diagrams of all kinds right through it. And you're probably very familiar with sequence diagrams if you do anything network or concurrency related.
Software level design documentation in aerospace make extensive use of UML (my shop even use PlantUML). Sequence diagrams in particular are quite useful.
People often find that level of documentation a bit redundant if you have access to the code, but if you're pressed for time and the diagrams actually describe the crucial parts it can be a huge timesaver when you have to fix something in a 10 year old component.
I have been involved in many teams where we used PlantUML for sequence diagrams, which are specially helpful to explain a complex process.
To me, I have saw considerable performance improvements when sharing sequence diagrams to devs that are not very familiar with a project or its domain.
Unfortunately, sometimes it is complicated to understand when a diagram is worth it because while an experienced dev can find something obvious, an less experienced one can struggle on that for a while.
EDIT: I forgot mentioning that these diagrams were super helpful when presenting solutions to technical customers/partners, instead of preparing a PoC, we could just create the diagrams to explain the proposal flows.
On a small project I used sequence diagrams to document a custom Api/data flow, so that another team (different company) had a reference for implementing the client to my (bespoke) JSON/REST server.
I frequently draw simplified architecture and data/entity diagrams that tend to be "mostly" UML.
Generally on a whiteboard while discussing design/architecture - rarely do they end up as permanent artifacts/documentation.
TL;DR: Not the UML you're taught in school, but check out C4 Model https://c4model.com/
--
Pure UML is pretty rare in my experience, and most likely used only in very strict environment that don't change often (security, airplanes,...).
UML concepts and diagrams however are extremely useful to collaborate on complex systems or flows.
However people don't tend to make good diagrams, unless they're very restrictive. I find that sequence diagrams are usually the ones with the best quality out there because you have to adhere to a strict (and rather simple) représentation.
For things that are not flows-like I would recommend using the C4 Model https://c4model.com/ :
- It provides a simple and constrained way to describe systems and their interactions.
- The first two levels are the most useful IMO as they provide a lot of information, while being rather static over time. Level 3 and 4 typically require frequent changes as your code evolves.
I hated I'll with a passion before, but in my actual job it would provide a better pivot point to explain structure and protocols compared to a GitHub issue in plain text. Ironic.
I use selective UML concepts to express my designs. My current tool of choice so far is StarUML which also lets me export the designs as nice looking HTML
My experience with the language from doing a constraint programming course in master's is that programs that can be solved quickly on procedural languages tend to require immense thinking and testing to be done in prolog. It's gotten so bad that all students don't even bother learning it since you aren't given much time during the exam and the problems are very complex.