Everything posted by Tyrsson
-
What are the best ways to learn programming?
I would say that there has been another resource left out of the list. For Php that resource would be Xdebug. By learning to use an actual Debugger like Xdebug (but for your language) it will teach you more about runtime processing than any other tool. You will get to see how the engine reads the code rather than how you think it reads the code. That is the single greatest source of bugs in software. We *think* the engine will process it this way, but it actually processes it completely different. The debugger will show you the difference and that will teach you many things.
-
Laravel the top PHP framework?
Let me put this gently. I would not recommend Laravel. Why would I say this? It is the most opinionated framework you will find in the market today. You are locked in from install. Its use of anti-patterns should be a crime (that was a joke :P ). See their "facade" use for an example. Its binds you to their container implementation. It's the equivalent of the Service Locator Pattern. If they provided it and left it at that it would be one thing, but they push this usage. Don't do it. You will regret it. Its prolific use of static is atrocious. Artisan is ok, but you can achieve the same level of tooling by leveraging Symfony console within any of the better built, more standards compliant, frameworks out there. Their ORM uses a Active Record pattern. It is not enterprise ready. Period. It performs worse than Doctrine ORM. The difficulty in unit testing.... Well, be my guest. You will figure it out. How do I know you can accomplish point 4? Well, because I have, more than once. https://github.com/tyrsson/masteringmezzio.com/tree/0.0.x/src/App/src/Tooling This is the Handler and its template file and wiring it creates by running the tooling for creating a CRUD handler. [MEDIA=gist]tyrsson/424314afa42673cf28e6b9ad777a7ea3[/MEDIA] Another couple of points is that last I checked they do not natively support psr 7 (if this has changed forgive the oversight). I have the same issue with Symfony and Laminas MVC (was zend framework MVC). Yes, they support middleware in a sense but they run pre controller and it's a convoluted process of figuring out exactly how to achieve your desired workflow. There are much simpler solutions. Not to mention, once you support "middleware" pre controller then your controllers are just Request Handlers, so why the misnomer? It only creates confusion for jr's. Not only that but I suppose it could be argued that it breaches the MVC pattern. On the same point about psr 7. Symfony and Laminas MVC both require a bridge to psr 7. Why incur the overhead of translation? If it's a new project go with a framework that supports psr 7 out of the box. For anything more than a simple marketing site I could not recommend Laravel. I could however recommend: Mezzio (supports Swoole out of the box) This is all I use if I get to make the decision. Slim Laminas MVC Symfony
-
Dark or light mode?
There can be only one. Dark mode :P
-
Do You Test Your Websites Online or Using Real Devices?
It depends greatly on what I am trying to test. For services I want to first test them at the Unit level ie php unit. The same services could then be integration tested within the built application. For load time via different network speeds I would probably test them via something like google pagespeed as seen from a "client's" perspective ie the application caller. For responsiveness I would first use Firefox Dev Edition and test them via all of the preset breakpoints in the developer tools. For throughput I would most likely test them via a docker setup and leverage apache bench as a starting point coupled with extensive Xdebug profiling. - This could in turn lead to extensive benchmarking in phpbench of particular instance method / function benchmarking to find solutions to the bottlenecks identified by apache bench/xdebug profiling.
-
My introduction
Possibly... :ROFLMAO:
-
My introduction
Damn, I didnt address the magic.... public function __call($name, $arguments) { return $this->instance->$name(...$arguments); }
-
My introduction
Complicated statement.... (me (research) and contributors) v2=u2+2 coupled with F=ma (a=F/m) Leads roughly to: (4.3/root(x))ms-1 if velocity is in the neighborhood of (3/x)ms-1 With time being v - 4.9t2 = -v - when 4.9t2 = 2v and vt = d (distance being 2 in this case). Now, 2 = 3.3x-1.5, and thus x-1.5 = ~0.6 Leading us to derive 1.4kg or 3 pounds of wood if the Woodchuck could chuck wood. Just sayin...
-
How many forums have you had (and what where they)?
Not had very many personal forums. Always been to busy building the software rather than the communities.
- Shawn Here!
-
Well....
I'm like 4 whiskeys in right now buahahahhahahah
- Well....
-
What would you do if someone copied your forum or blog?
What? I mean if they went through all the trouble to offshore to get around a DMCA etc etc and refuse to remove it.... (insert those other means here)
-
What would you do if someone copied your forum or blog?
Or, there are other means..... .. . Juussst saayyyin.. . ;)
-
Which coding language should a new developer start with?
Well, lets clarify a few things. 1) Html is not a programming language. It is a markup language. Various tech stacks use it along with CSS as does your browser to represent a http message (the response side of that communication is your web page) among other things but that is the primary use. They build page structure and style respectively. Yes, some will argue these points. I do not care. 2) There are two primary types of coding environments in respect to web development. Server side and client side. It is true this line has been blurred somewhat with the wide adoption of Nodejs. Node is arguably one of the worst things to happen to the internet in a very long time. Just my opinion. If I were just starting out I would start with any of the languages that share a C style syntax. Since it will make it easier to learn another language that shares that same code syntax style. Say Php and Javascript. They are very close in syntax. Go is another one that has very nice syntax that is more or less of the same branch. I would also consider whether its a compiled or "run time" language. Start with a runtime language like Php or JS and get a good grasp of either or both before jumping into something like C# etc. Your knowledge base will have grown and you will have an easier time just setting up all of the tooling you will need to both write and compile the code. Most importantly. Remember. It is learning a new language. Only with programming you have two master dictionaries. The one that holds the languages core API's (ie the Classes/Methods/Functions etc) and the one that you write (your application/program) to interact with them. Programming is the art of data manipulation. Start with the basics. Most of all. Have fun =) P.S. If you wanna get real crazy you could start by learning: https://en.wikipedia.org/wiki/Brainfuck
-
What's your preferred coding language and why?
Could have sworn I had just suggested Pico css in the post you quoted...
-
Htmx: Just hype or not...
If you work with html/css/js on a regular you really need to look into Htmx. Especially those folks that drive platforms from a php backend API. I do not say this often, but its just the truth as I see it. Htmx will change your life. For the rare person that uses Laminas/Mezzio. Don't worry, I got you, Htmx package upcoming.
-
What's your preferred coding language and why?
I do not like it. For several reasons. The tech overhead for getting started with it is large. It, iirc, requires a build step. My number one rule for anything that is going to be added to my tech stack is no REQUIRED build step. I do not want to use 3 frameworks. If the css framework comes with its own cli tooling that should be a sign to steer clear. I would suggest checking out Pico css ;)
-
Do you watch a movie everyday?
I rarely watch TV or movies at all. There's a few TV series I watch but other than that I might watch a movie a month.
-
What's your preferred coding language and why?
My primary go to is Php. Im proficient in vanilla JS but would prefer it to be strictly typed without the need for TS. I know a little Python and even less Ruby. I hate UX/UI programming. I can do it, but I would really REALLY rather not.
-
How did you get into web development?
For me the journey started with MySpace and building profile code. Which quickly led to me building an html site and I wanted to add a forum so a friend of mine at the time that was a developer set me up a forum, which was SimpleMachines. I was hooked and have never looked back.
-
Well, there goes the neighborhood.
Surely not :P
-
My first custom framework
Of course. That's what I specialize in. Web application development.
-
My first custom framework
So far. It's showing a total execution elapsed time of 0.018 ms (give or take a few depending on the run). Note, that is in development mode which does zero config file caching.
-
How long do you store client files?
I still have project archives from 2010 just in case a client needs a backup.
-
Identifying and overcoming your weaknesses as a freelancer
My only weakness is Regex and I can do it and very well. It just takes more time than I would like.