140 - Code Iteration time is critical to web development success
How To Code Well - En podkast av Peter Fisher - Fredager
Kategorier:
Change log We’ve almost finished the first pass of the documentation for the new PHP course. I have 1 / 2 lessons to go. There are two more passes that I want to do before recording any of the lessons. The next pass will be to create the project from start to finish using the documentation but on a Ubuntu VM. The last pass will be to do the same bu on a Windows VM Last weeks show that was on shopping carts went live earlier this week. I had some internet issues last week so I couldn’t do the live stream Your feedback 1) Eric writes in on my hack to check if PHP is working YT short and asks if the next video will be on the PHP 8 match expression and when to use it. I can’t promise that it will be the next YT short but I can say that It is on the schedule. 2) Keral writes in on my PHP array sum tutorial and asks how do we sum fields in a database. There is a SUM function in MySQL. It takes one argument and that is the expression that you want to calculate. You can use it to find the sum of a field from several records by suppling the field name as the expression. Then add the reset of the query as usual. For example, To get the sum of a shopping basket you could do something like this; Let’s say you had a table of order items with a foreign key linking to an orders table. Each order item record would also have a price field. You could get the sum of the orders price like so: select sum(order_item.price) from order_item where order_item.order_id = 4; Obviously change the table name of order to something else as order is a reserved keyword in MySQL. If you have a comment that you want read out on the show then either write a message on a YouTube video or send me a message on our contact form. Code Iteration time is critical to web development success I want to talk about a blog posted titled 3 lines of code shouldn’t take all day https://devtails.xyz/3-lines-of-code-shouldnt-take-all-day by Adam Berg. In the post Adam talks about his time developing video games at Electronic Arts. He mentions that due to the testing tools and development requirements it could take up to a day to write 3 lines of code. This iteration time was greatly reduced when he used 'test beds'. Adam mentions in his article that the test beds focused on particular areas of code which meant the tooling was slimmed down. This allowed him to laser in to the code that needed to be tested and as a result made the code iteration far quicker. He goes on in the post to talk about using unit testing which also made his life a lot easier. These test packages only contained the code which was specific to his teams requirements. Again, this was a slimmed down portion of a game. He mentions that these test packages took less than a second to compile and run. This made him less distracted and he could focus on the task at hand.