Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ekpono's avatar
Level 12

REQUEST TO HAVE DATA STRUCTURE AND ALGORITHMS COURSE ON LARACASTS

We know how important it is to understand data structure and algorithms especially during interviews and once in a while it is an important tool for our jobs. I would be thrilled if Laracasts (Jeffery Way) can create a solid course for it.

You can upvote this to get attention. Thank you

4 likes
21 replies
vincent15000's avatar

Data structure, you mean in the database for example ?

1 like
ekpono's avatar
Level 12

No, general Data Structure in computer science e.g Linked List, Array, Tree, Graphs and all sorts of stuff concerning computer science

1 like
tykus's avatar

I have been at this programming thing for a couple of decades, and never, ever used these data structures and algorithms except in pedagogical and technical test scenarios.

2 likes
JussiMannisto's avatar

@vincent15000 10 hours ago you didn't know what the term data structure meant, but you agree that they're not needed?

2 likes
JussiMannisto's avatar

@tykus I'm surprised by this take. I know this is web programming forum about a framework that boots and exits on every request, but still. You never think about problems in terms of data structures?

I think it's important to understand the basics. I'm not saying you have to remember how to write quicksort from scratch, but it helps to be able to make some quantitative estimates about performance rather than just guessing. Otherwise, any non-trivial problem becomes trial and error, which IMO isn't taking the job seriously. You can't always push everything live to see if it can handle production loads and then roll back when the database becomes unresponsive or the queued job times out.

It might not matter for CRUD form apps with 100 users, but not every program is like that.

@ekpono In my opinion, you absolutely should learn about those things, and not only for job interviews. But just know that you'll mostly use them without actually implementing them yourself, at least in web programming.

3 likes
tykus's avatar

@JussiMannisto just saying I never had a need to use or implement a linked lists, or bubblesort, or whatever in a real world application. Doesn't follow that one doesn't understand Big-O ¯\_(ツ)_/¯.

YMMV.

2 likes
ekpono's avatar
Level 12

@JussiMannisto You are right, I am always surprised why developers hold the opinion that learning the basics of programming should not be an important skill set. If you are going to stay 8 hours everyday on your job, the least you can do is be good at the basics

JussiMannisto's avatar

@tykus Fair enough. I guess I read too much into your comment, thinking you were recommending against learning about these things.

jlrdw's avatar

There are also packages to install for things like linked list, etc.

Algorithms involve a lot of higher math skills. Those people that program nesting for sheet metal cutting has to know a lot of advanced math.

But for general database management it's not needed. You are probably better off following laravel conventions, setting up proper indexes, following MVC, etc.

You will find much of what you are talking about in programming like python, C++, etc.

1 like
JussiMannisto's avatar

@jlrdw

There are also packages to install for things like linked list, etc.

Why would anyone install a package for linked lists? This reminds me of the is-even package on npm. But also, the Standard PHP Library already has linked lists.

But for general database management it's not needed. You are probably better off following laravel conventions, setting up proper indexes, following MVC, etc.

Database indexes are B+trees, with nodes connected via doubly-linked lists. If someone doesn't understand basic data structures, they can't know how indexes work. How would they know what a "proper index" is if they have no idea how they work under the hood?

2 likes
jlrdw's avatar

@JussiMannisto I've see many users use https://github.com/lazychaser/laravel-nestedset and similar in laravel.

And you don't have to understand the in depth studies required to for example index an id and name column in SQL. The background work has been done for you.

Your comment kind of implies anyone using Mysql has an in depth knowledge of the code used to achieve such indexing.

I have myself used b-tree programs in progeny in dogs to check for such things as the amount of inbreeding.

I have also in python programmed flat pattern development for duct fittings, like:

  • transitions
  • rectangular to round
  • offsets of various types
  • etc

But I never got good enough to do advanced nesting.

But for the average laravel user, the things mentioned above by OP is not needed.

But there are other learning materials out there.

Edit:

And yes I have in the past read the parts of the Mysql manual covering how indexes basically work. I have even forgotten much of what I read, again not generally needed. But the mysql manual doesn't teach their programming that makes it work. Which I think is what the OP is after.

Like the laravel manual shows how to upload a file, but not what is happening behind the scenes. Which symfony goes through a routine and ends up using the php move for the upload.

But the average laravel user may not even know that neither. All they know is what the laravel docs tell them to do for an upload.

Yes some, perhaps you, me, and others also study the framework code, and the symfony code to see what is happening behind the scenes. But again to use laravel for the average user, not needed.

1 like
JussiMannisto's avatar

@jlrdw

Your comment kind of implies anyone using Mysql has an in depth knowledge of the code used to achieve such indexing.

I didn't mean to imply that. But it's also not exactly arcane knowledge.

I was thinking of a thread from not too long ago, where someone had performance issues on their large database. I think they even used the phrase properly indexed to describe the table, which I took to mean that every column had a separate index. Their query ran fast when they had a where-condition on one column, but slowed down when additional conditions were added. They didn't understand why that would be. After all, they were just adding more filters and every column was indexed, so they thought the query should've been faster.

The right move there was to dedicate one afternoon to reading about indexes: how they're structured and how they're used. That would've cleared things up, but I don't know if they did that.

I agree that going deep into databases isn't necessary for day 1, and you can build apps without knowing too much. But it may become important to learn at some point, and then it helps if you have the necessary tools to understand the material. That means knowing data structures.

1 like
Tray2's avatar

@JussiMannisto I might have used the term "Properly index", but in my world that doesn't mean all columns, because that will give other performance issues in the database. I think Aaron Francis put it best.

"Use as many indexes as you need, but as few as you can get away with."

Knowing how to analyze queries and take the appropiate action is in my opinion worth way more that knowing how to do a bubble sort.

When it comes to database driven applications, most, if not all performance issues comes down to how the database is structured and the queries are written.

Unfortunately tha knowledge on how to use the database in the way it is intended , is something that too many don't really care about.

Sidenote: I'm not the author of the thread being referred to by @jussimannisto

JussiMannisto's avatar

@Tray2 The author said they had all columns indexed, and I'm guessing they meant an index on each column used in a query condition. So not necessarily bad, but clearly not sufficient in their case. They used multiple conditions, each targeting a separate index. With the correct composite indexes and some refactoring, I think the queries could've been turned into simple range scans.

Knowing how to analyze queries and take the appropiate action is in my opinion worth way more that knowing how to do a bubble sort.

Yes. But algorithms are often taught alongside complexity analysis, which helps with both code and databases. At least it provides some foundation for thinking about it, even if it usually boils down to something simple, like million operations = ok, million^2 operations = not ok.

When it comes to database driven applications, most, if not all performance issues comes down to how the database is structured and the queries are written.

Plus caching.

ekpono's avatar
Level 12

Learning DSA breaks "expert beginner" circle, When I started programming, Laracasts was an integral part of me getting my first job 6 years ago, it was easy because almost every basic solution has a package or the framework (Laravel) has out of the box solution.

This convenience comes with a great cost of being an expert beginner. Using solutions you don't quite understand how it works under the hood and getting in the loop of trial and error. Over time, you can easily understand common problems and solutions but understanding bits, byte, memory, RAM, floating point, databases, hardware-software relationship is a huge challenge.

It's okay if you want to use packages all through your career, and never really contributing or creating something that stands out in the industry, but I think it is a terribly bad idea to suggest that beginners should not understand the basis of programming.

You can't even work in FAAG if you can't differentiate between hash table, graphs, tree, time complexity etc because when it comes to scaling application to millions of user, you need these basic skills.

jlrdw's avatar

An example:

Say you are going to use list in java. You import it.

import java.util.List;

I may have as example:

List<Car> cars=new ArrayList<Car>();

and

            Car cc=new Car();
        	cc.setMake("volvo");
            cc.setDoors(0);
            cars.add(cc);

So from the documentation and tutorials I learn how to use list.

However the people who wrote:

import java.util.List;    < -----This

^ |

Are the ones with the math and computer science backgrounds.

So exactly what are you after?

  • Jeffrey teaching advanced math and higher computer science

Or

  • Jeffrey teaching the basic usage of these things.

I don't believe he is going to cram 4 or more college years into a video course.

I have used python dictionaries by studying how to use them and looking up examples. But no I couldn't program the programming that make them work.

As I am very good for example at PHP. But I couldn't program PHP in C myself.

I would suggest taking some higher math and advanced computer science courses.

JussiMannisto's avatar

@jlrdw You're still using the data structures, even if someone else wrote them. It's still useful to know what's going on. Let's take these two lines of code:

isset($cache[$id]);
in_array($id, $cache);

Knowing PHP arrays immediately tells you which cache implementation is faster, and why it's so much faster.

I don't agree that you need that advanced math for basic algorithms and data structures. It's mostly just powers and logarithms.

ekpono's avatar
Level 12

@jlrdw now you are seeing my point, you don't need advanced math skills to learn this course, right? now imagine if Laracasts is teaching the course, I reckon it would be much more better than w3schools

jlrdw's avatar

@ekpono If you want to learn this that's fine.

But as already mentioned not actually needed for database management.

I've been at this since the latter 1980's starting out in dbase 3. I can understand the need to know how to setup the correct indexes in a database.

And yes I have had courses such as matrices and determinants.

But again when it comes to sorting (ORDER BY), the work is already accomplised by the programmers that maintain MySql.

It sounds more like you want to program things like Mysql than use it. So by all means learn this stuff.

Even when I programmed in java, servlets and and beans, for truck dispatch, A/R, A/P, payroll, etc I never needed such things. And many were multi pick and drop loads, thus child tables.

But I agree to know how and when and what to use an index on, much of which is common sense.

Just curious, why a course here when these courses exist already?

Like another user has said in past post, let the database to it's job.

Edit:

I just don't believe things like this is needed for laravel:

Quote

Unquote

Which is from that course. But of course learn what you feel you need to.

Please or to participate in this conversation.