Make sure you aren’t working really hard to solve the problem you think you have. Take a step back and make sure you have the problem correct.
My juniors often run into this problem where they spend a ton of time trying to get something to work a certain way, instead of backing up and going about the solution a different way. If it seems hard and over complicated, there is probably a simpler way to achieve the same result.
I would see it as a good way to see what needs to be better documented. Pose the question there, when question is answered make sure the answer is a reference to documentation. Then if someone in the future has a close enough question, they are pointed to the correct documentation.
Probably only viable for companies with large departments spread across multiple locations.
I asked one like this for a guy who claimed to be an expert in JavaScript but had pretty much no experience and nothing to back it up. He was a boyfriend of a co-workers sister, so I wanted to make sure he was legit. He failed the question and took a long time to give up, but I had one of my junior devs figure it out to prove I didn’t make it overly obscure.
I do have another question I ask that has jibberish code which mixes multiple languages. I ask the interviewer what is wrong with the code, after making it clear it is intentionally not a valid language. This question helps me to identify the level the developer is most likely at and what may be their specialty. Did they focus on syntax, security, optimization, maintainability, etc...?
You can use vagrant and have it work with a custom image. I do this with a custom box with the installation setup like my prod box. Vagrant handles my virtual file mapping and makes it easy to share my box with team members who don’t have much knowledge/experience of VMs.
Running with NFS settings in the vagrant file allows the box to run extremely performant, and I have e been able to set it up to run with necessary settings for MacOS, Windows and varieties of Linux.
Folders are extremely deeply nested, lots of node_modules and client uploaded file folders, have never ran into a problem. Also the file permissions are setup to assign the owner and permission sets. For mine I did a simple 755 folders and 644 files, but you can get complex.
I had a “friend” do the same sort of thing. Had shared my resume with him so he could see the format and style I used. Once I saw his resume he stole my format style and had a lot of the verbiage, skills and experience that I had on my resume. Many of which I knew were not skills or experiences he had.
I cut him off as a friend and let him be, figuring he will either figure it out or fail and get fired (I was hoping for the latter at the time).
Boolean doesn’t solve it but solves the same problem as datetime with less data. The date information should be stored in an event history table. The Boolean would merely provide a quick way to obtain the status without obscuring detail. The example used above was not a full solution to how order tracking should be done, but merely to serve as an example for what I am talking about.
I agree with you overall but it is important to either queue the longer queries or ensure they are not accessible by the average user. Weekly/Monthy reports are a great example of a query that will longer queries. Protections just need to be in place to prevent a large amount of these requests from consuming all allowed active connections. This includes dynamic scaling as a solution, but it is something I would be sure to think about in relation to my user stories.
What about multiple refunds, based on multiple parts to the order?
The full log data would be good to hold the date field information, but I would still go with a boolean in the case of replacing a orderStatus field on an order record, since the original purpose of a column similar to orderStatus would be for quick querying of orders by a particular state or set of states.
Logs are good and should be kept, but when reporting you don't want to query them on a larger scale (inline with NrdyN8's comment). On a small scale, expect you have 1 million rows for orders. Each of those orders has had on average 5 status changes. Looking for a single set of the order data across 5 million rows, no problem. Querying the log to find all orders where one status existed but another didn't, that is going to eat up a lot more query time.
Remember in db querying, 1 second query time is wayyyyy too long.
migrate:refresh should only be rolling back the migrations that have been successful and are in your migrations database. If you haven't called the up on this migration, down should not be being called.
First item in a collection. Might not need it, but can’t recall off hand at the moment. Dd the value before accessing the first. See if standings is still a collection, I think it will be.
The orderby is going to act a little odd with the way you are wanting it. Essentially what you have going on above is it is sorting the teams based on the standings, but then the teams standings are grouped under them, so the teams are now in decending order of the team who has the most points to the least, but if they have multiple standings, the secondary may be out of order.
Is your standings a HasOne or HasMany relationship?
If it is HasOne, then you should be able to change the blade to:
@foreach($teams as $team)
{{$team->standings->Pts}}
@endforeach
If you are still struggling, I can help you more by looking at your full code, if you share it via bitbucket (free to share private repos), github or another source code repo.
edit: Referenced original post, I see the standings relationship is HasMany
Make sure you aren’t working really hard to solve the problem you think you have. Take a step back and make sure you have the problem correct.
My juniors often run into this problem where they spend a ton of time trying to get something to work a certain way, instead of backing up and going about the solution a different way. If it seems hard and over complicated, there is probably a simpler way to achieve the same result.
I would see it as a good way to see what needs to be better documented. Pose the question there, when question is answered make sure the answer is a reference to documentation. Then if someone in the future has a close enough question, they are pointed to the correct documentation.
Probably only viable for companies with large departments spread across multiple locations.
Value add does seem pretty minimal.
I asked one like this for a guy who claimed to be an expert in JavaScript but had pretty much no experience and nothing to back it up. He was a boyfriend of a co-workers sister, so I wanted to make sure he was legit. He failed the question and took a long time to give up, but I had one of my junior devs figure it out to prove I didn’t make it overly obscure.
I do have another question I ask that has jibberish code which mixes multiple languages. I ask the interviewer what is wrong with the code, after making it clear it is intentionally not a valid language. This question helps me to identify the level the developer is most likely at and what may be their specialty. Did they focus on syntax, security, optimization, maintainability, etc...?
You can use vagrant and have it work with a custom image. I do this with a custom box with the installation setup like my prod box. Vagrant handles my virtual file mapping and makes it easy to share my box with team members who don’t have much knowledge/experience of VMs.
Running with NFS settings in the vagrant file allows the box to run extremely performant, and I have e been able to set it up to run with necessary settings for MacOS, Windows and varieties of Linux.
Folders are extremely deeply nested, lots of node_modules and client uploaded file folders, have never ran into a problem. Also the file permissions are setup to assign the owner and permission sets. For mine I did a simple 755 folders and 644 files, but you can get complex.
UTF-8 is Unicode, so not sure what you are asking/expecting.
Use DBlib and PDO: http://php.net/manual/en/ref.pdo-dblib.php
https://stackoverflow.com/questions/5953882/connecting-to-mssql-using-pdo-through-php-and-linux
That’s how I did my version, hadn’t seen this project when I did mine.
https://github.com/awkwardideas/LangJS
I had a “friend” do the same sort of thing. Had shared my resume with him so he could see the format and style I used. Once I saw his resume he stole my format style and had a lot of the verbiage, skills and experience that I had on my resume. Many of which I knew were not skills or experiences he had.
I cut him off as a friend and let him be, figuring he will either figure it out or fail and get fired (I was hoping for the latter at the time).
Boolean doesn’t solve it but solves the same problem as datetime with less data. The date information should be stored in an event history table. The Boolean would merely provide a quick way to obtain the status without obscuring detail. The example used above was not a full solution to how order tracking should be done, but merely to serve as an example for what I am talking about.
Correct, I was using the above as a relatable sample.
I agree with you overall but it is important to either queue the longer queries or ensure they are not accessible by the average user. Weekly/Monthy reports are a great example of a query that will longer queries. Protections just need to be in place to prevent a large amount of these requests from consuming all allowed active connections. This includes dynamic scaling as a solution, but it is something I would be sure to think about in relation to my user stories.
What about multiple refunds, based on multiple parts to the order?
The full log data would be good to hold the date field information, but I would still go with a boolean in the case of replacing a orderStatus field on an order record, since the original purpose of a column similar to orderStatus would be for quick querying of orders by a particular state or set of states.
What is the advantage of using one column?
Logs are good and should be kept, but when reporting you don't want to query them on a larger scale (inline with NrdyN8's comment). On a small scale, expect you have 1 million rows for orders. Each of those orders has had on average 5 status changes. Looking for a single set of the order data across 5 million rows, no problem. Querying the log to find all orders where one status existed but another didn't, that is going to eat up a lot more query time.
Remember in db querying, 1 second query time is wayyyyy too long.
migrate:refresh should only be rolling back the migrations that have been successful and are in your migrations database. If you haven't called the up on this migration, down should not be being called.
https://postmarkapp.com/ - For transactional (user requested/opt-in only)
https://sendgrid.com/ - For transactional or marketing
Going the cheaper route -
https://aws.amazon.com/ses/
https://www.mailgun.com/
https://www.sparkpost.com/
Pricing comparison grid:
https://s3.amazonaws.com/media-p.slid.es/uploads/755503/images/4272264/Brand_Comparison_10-27-2017.png
Bah it’s because I’m confusing you again, I missed making first a function. Add the () to it in the original setup
First item in a collection. Might not need it, but can’t recall off hand at the moment. Dd the value before accessing the first. See if standings is still a collection, I think it will be.
https://laravel.com/docs/5.5/collections#method-first
Sorry put the contents of the “with” inside an array
It is using a closure to filter the relationship. What’s the error thrown? I usually put mine in a static function then reference the static function
If you want to get directly to that request, you can use a join call then.
I wouldn't typically use those though. I think the below set should work for you based on everything you have said.
If standings are has many because of season you can do a trick of
For that relationship always go with ownership
The division owns the teams who own their standings.
will reply more but gotta go feed my kid
The orderby is going to act a little odd with the way you are wanting it. Essentially what you have going on above is it is sorting the teams based on the standings, but then the teams standings are grouped under them, so the teams are now in decending order of the team who has the most points to the least, but if they have multiple standings, the secondary may be out of order.
Is your standings a HasOne or HasMany relationship?
If it is HasOne, then you should be able to change the blade to:
If you are still struggling, I can help you more by looking at your full code, if you share it via bitbucket (free to share private repos), github or another source code repo.
edit: Referenced original post, I see the standings relationship is HasMany