Your code sucks, let's fix it

How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.

Slides

comments powered by Disqus

Related Posts

PHP5 e o mercado

PHP5 e o mercado

  • July 18, 2006

Em julho de 2004 foi lançado o PHP5, naquele momento se tratava apenas de uma experiencia que como tudo que é novo trouxe muita resistência por parte dos desenvolvedores, só de se pensar em adaptar scripts antigos programadores se contorciam.

Read More
Why I support "The League"

Why I support "The League"

  • March 10, 2015

There has been a lot of drama and press around it lately, but which does it really deserve?

Read More
Using User-Defined Varibles in MySQL

Using User-Defined Varibles in MySQL

  • September 28, 2006

Cast the first stone he who never made a mistake modeling a database! Every now and then in your career you will be face to face with a problem like this: due to the nature of a table’s data you created a table without a primary key, or using a composed key. So far so good, but due to an upgrade you see the need to have a unique key identifying all the registers in your table, in my case it was due to a AJAX interface.

So what now? You have a table full of data, and of course, as Murphy’s law will tell you, that data cannot be erased. MySQL will prevent you from turning a filled to a primary key if it finds duplicated values in the table. Quite a brain twister, but I did a little research and found a rather simple solution to the matter.

UPDATE: So it actually came to my atention that a query I had already tried does the job in an even simpler form, but my modelling tool executed the commands out of sync and that why i had problems. So this article stays on as a good example of how to use mysql variables.

Read More